diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-11-07 16:01:00 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-11-07 16:50:40 +0000 |
| commit | 6410b21bc162fd5f9527bda7484828c53cd872d0 (patch) | |
| tree | b628ceee8e459fa8e62ab492ba38e577b5d777ac /vm | |
| parent | 069a4a6eb9923b8553bcbc4dd2d75a528da14453 (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.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) } |
