mirror of https://github.com/containers/podman.git
pkg/parallel: remove deadcode
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
41d3ab7aba
commit
2ec0fa0059
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue