mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
prevent unlock until container sort complete
This commit is contained in:
parent
8a1297d3c5
commit
e71b6cacce
@ -161,9 +161,9 @@ func (cm *Docker) All() (containers container.Containers) {
|
||||
for _, c := range cm.containers {
|
||||
containers = append(containers, c)
|
||||
}
|
||||
cm.lock.Unlock()
|
||||
sort.Sort(containers)
|
||||
containers.Filter()
|
||||
cm.lock.Unlock()
|
||||
return containers
|
||||
}
|
||||
|
||||
|
@ -192,9 +192,9 @@ func (cm *Runc) All() (containers container.Containers) {
|
||||
for _, c := range cm.containers {
|
||||
containers = append(containers, c)
|
||||
}
|
||||
cm.lock.Unlock()
|
||||
sort.Sort(containers)
|
||||
containers.Filter()
|
||||
cm.lock.Unlock()
|
||||
return containers
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user