diff options
author | baude <bbaude@redhat.com> | 2018-10-23 18:40:34 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2018-10-25 07:50:46 -0500 |
commit | 3e5a5c68da9884ddb46cb9e84435956996347a4b (patch) | |
tree | a4b169f923fc64b3fadab0bab8de711d677eb3c5 /cmd/podman/shared/container.go | |
parent | 57f778aed93efc0961b1335bcd07c3c82a11da0a (diff) | |
download | podman-3e5a5c68da9884ddb46cb9e84435956996347a4b.tar.gz podman-3e5a5c68da9884ddb46cb9e84435956996347a4b.tar.bz2 podman-3e5a5c68da9884ddb46cb9e84435956996347a4b.zip |
Add --max-workers and heuristics for parallel operations
add a global flag for --max-workers so users can limit the number
of parallel operations for a given function. also, when not limited
by max-workers, we implement a heuristic function that returns the
number of preferred parallel workers based on the number of CPUs and
the given operation.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/shared/container.go')
-rw-r--r-- | cmd/podman/shared/container.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/shared/container.go b/cmd/podman/shared/container.go index 4af737e0a..b847314a4 100644 --- a/cmd/podman/shared/container.go +++ b/cmd/podman/shared/container.go @@ -226,10 +226,10 @@ func NewBatchContainer(ctr *libpod.Container, opts PsOptions) (PsContainerOutput return pso, nil } -type pFunc func() (PsContainerOutput, error) +type batchFunc func() (PsContainerOutput, error) type workerInput struct { - parallelFunc pFunc + parallelFunc batchFunc opts PsOptions cid string job int |