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>
This commit is contained in:
Matthew Heon 2018-08-31 13:06:29 -04:00
parent 6d067fcba2
commit 4291a43a54
1 changed files with 1 additions and 1 deletions

View File

@ -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 {