refactor: move pure code outside actor
This commit is contained in:
1 parent
7cc2a1fe38
commit
72e134605c
1 file changed
+4
-4
+4
-4
@@ -321,11 +321,11 @@ func (alloc *Allocator) ContainerStarted(ident string) {
|
||||
}
|
||||
|
||||
func (alloc *Allocator) PruneOwned(ids []string) {
|
||||
idmap := make(map[string]struct{}, len(ids))
|
||||
for _, id := range ids {
|
||||
idmap[id] = struct{}{}
|
||||
}
|
||||
alloc.actionChan <- func() {
|
||||
idmap := make(map[string]struct{}, len(ids))
|
||||
for _, id := range ids {
|
||||
idmap[id] = struct{}{}
|
||||
}
|
||||
alloc.pruneOwned(idmap)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user