aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-11-07 16:01:00 +0100
committerDmitry Vyukov <dvyukov@google.com>2024-11-07 16:50:40 +0000
commit069a4a6eb9923b8553bcbc4dd2d75a528da14453 (patch)
treecc81e8eb53b2765c1371151112c8f9a3c9613321 /vm
parentf9c0cd6946b545524891cbe6eaafb3bd773b9b0a (diff)
vm: simplify code
Diffstat (limited to 'vm')
-rw-r--r--vm/vm.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/vm/vm.go b/vm/vm.go
index ee40865d7..d2165a276 100644
--- a/vm/vm.go
+++ b/vm/vm.go
@@ -333,11 +333,7 @@ func (inst *Instance) Close() error {
}
func NewDispatcher(pool *Pool, def dispatcher.Runner[*Instance]) *dispatcher.Pool[*Instance] {
- return dispatcher.NewPool(pool.Count(),
- func(idx int) (*Instance, error) {
- return pool.Create(idx)
- },
- def)
+ return dispatcher.NewPool(pool.Count(), pool.Create, def)
}
type monitor struct {