pkg/parallel: remove deadcode

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2025-06-18 14:41:22 +02:00
parent 41d3ab7aba
commit 2ec0fa0059
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
1 changed files with 0 additions and 11 deletions

View File

@ -11,10 +11,6 @@ import (
)
var (
// Maximum number of jobs that will be used.
// Set a low, but non-zero, default. We'll be overriding it by default
// anyways.
numThreads uint = 8
// Semaphore to control thread creation and ensure numThreads is
// respected.
jobControl *semaphore.Weighted
@ -32,19 +28,12 @@ func SetMaxThreads(threads uint) error {
jobControlLock.Lock()
defer jobControlLock.Unlock()
numThreads = threads
jobControl = semaphore.NewWeighted(int64(threads))
logrus.Infof("Setting parallel job count to %d", threads)
return nil
}
// GetMaxThreads returns the current number of threads that will be used for
// parallel jobs.
func GetMaxThreads() uint {
return numThreads
}
// Enqueue adds a single function to the parallel jobs queue. This function will
// be run when an unused thread is available.
// Returns a receive-only error channel that will return the error (if any) from