refactor: move pure code outside actor

This commit is contained in:
Matthias Radestock committed 2016-04-26 20:02:47 +01:00
1 parent 7cc2a1fe38
commit 72e134605c
1 file changed
+4 -4
+4 -4
View File
@@ -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)
}
}