diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-08-31 13:06:29 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@gmail.com> | 2018-08-31 13:18:34 -0400 |
commit | 4291a43a54edac8c0a06e42f8cd69d2020e559f2 (patch) | |
tree | 9a6c16d00c163c3e87d01d2d60b08acbad19f970 /libpod | |
parent | 6d067fcba2bf84fb5e7c7691b796d42d67028176 (diff) | |
download | podman-4291a43a54edac8c0a06e42f8cd69d2020e559f2.tar.gz podman-4291a43a54edac8c0a06e42f8cd69d2020e559f2.tar.bz2 podman-4291a43a54edac8c0a06e42f8cd69d2020e559f2.zip |
Up time between checks for podman wait
Prior to this patch, we were polling continuously to check if a
container had died. This patch changes this to poll 10 times a
second, which should be more than sufficient and drastically
reduce CPU utilization.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_api.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index 5df7e2f0e..86e2370ea 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -597,7 +597,7 @@ func (c *Container) Wait() (int32, error) { return -1, ErrCtrRemoved } - err := wait.PollImmediateInfinite(1, + err := wait.PollImmediateInfinite(100*time.Millisecond, func() (bool, error) { stopped, err := c.isStopped() if err != nil { |