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
commit6410b21bc162fd5f9527bda7484828c53cd872d0 (patch)
treeb628ceee8e459fa8e62ab492ba38e577b5d777ac /vm
parent069a4a6eb9923b8553bcbc4dd2d75a528da14453 (diff)
pkg/manager: set more http fields before calling Serve
Pools and ReproLoop and always created on start, so there is no need to support lazy set for them. It only complicates code and makes it harder to reason about. Also introduce vm.Dispatcher as an alias to dispatcher.Pool, as it's the only specialization we use in the project.
Diffstat (limited to 'vm')
-rw-r--r--vm/vm.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm/vm.go b/vm/vm.go
index d2165a276..27e6f319e 100644
--- a/vm/vm.go
+++ b/vm/vm.go
@@ -332,7 +332,9 @@ func (inst *Instance) Close() error {
return err
}
-func NewDispatcher(pool *Pool, def dispatcher.Runner[*Instance]) *dispatcher.Pool[*Instance] {
+type Dispatcher = dispatcher.Pool[*Instance]
+
+func NewDispatcher(pool *Pool, def dispatcher.Runner[*Instance]) *Dispatcher {
return dispatcher.NewPool(pool.Count(), pool.Create, def)
}