From 4291a43a54edac8c0a06e42f8cd69d2020e559f2 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Fri, 31 Aug 2018 13:06:29 -0400 Subject: 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 --- libpod/container_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod') 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 { -- cgit v1.2.3-54-g00ecf