From 6c5ebb0315fc6527c0d75ca53fb6b027d20802a5 Mon Sep 17 00:00:00 2001 From: TomSweeneyRedHat Date: Sat, 14 Apr 2018 17:32:49 -0400 Subject: Change container.locked to batched Signed-off-by: TomSweeneyRedHat Closes: #619 Approved by: mheon --- libpod/container_top.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpod/container_top.go') diff --git a/libpod/container_top.go b/libpod/container_top.go index bc007c408..28c1e33d2 100644 --- a/libpod/container_top.go +++ b/libpod/container_top.go @@ -15,7 +15,7 @@ import ( // GetContainerPids reads sysfs to obtain the pids associated with the container's cgroup // and uses locking func (c *Container) GetContainerPids() ([]string, error) { - if !c.locked { + if !c.batched { c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { @@ -41,7 +41,7 @@ func (c *Container) getContainerPids() ([]string, error) { // GetContainerPidInformation calls ps with the appropriate options and returns // the results as a string and the container's PIDs as a []string func (c *Container) GetContainerPidInformation(args []string) ([]string, error) { - if !c.locked { + if !c.batched { c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { -- cgit v1.2.3-54-g00ecf