mirror of
https://github.com/c-cube/moonpool.git
synced 2026-05-05 08:54:24 -04:00
ws pool: use ws queue in as_runner
This commit is contained in:
parent
18701bfde4
commit
20f6d04318
1 changed files with 4 additions and 1 deletions
|
|
@ -223,7 +223,10 @@ let as_runner_ (self : state) : t =
|
|||
Runner.For_runner_implementors.create
|
||||
~shutdown:(fun ~wait () -> shutdown_ self ~wait)
|
||||
~run_async:(fun ~fiber f ->
|
||||
schedule_in_main_queue self @@ T_start { fiber; f })
|
||||
let task = WL.T_start { fiber; f } in
|
||||
match get_current_worker_ () with
|
||||
| Some wst -> schedule_from_w wst task
|
||||
| None -> schedule_in_main_queue self task)
|
||||
~size:(fun () -> size_ self)
|
||||
~num_tasks:(fun () -> num_tasks_ self)
|
||||
()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue