Merge pull request #601 from LK4D4/fix_stats_race
Fix race between Apply and GetStats
This commit is contained in:
commit
6fc66fea48
|
@ -130,6 +130,8 @@ func (m *Manager) Apply(pid int) (err error) {
|
|||
return cgroups.EnterPid(m.Paths, pid)
|
||||
}
|
||||
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
paths := make(map[string]string)
|
||||
for _, sys := range subsystems {
|
||||
if err := sys.Apply(d); err != nil {
|
||||
|
|
Loading…
Reference in New Issue