mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-05 19:00:33 -05:00
fix test
This commit is contained in:
parent
ee7972910f
commit
997d996c13
1 changed files with 2 additions and 5 deletions
|
|
@ -14,14 +14,11 @@ let run ~kind () =
|
||||||
let pool =
|
let pool =
|
||||||
let on_init_thread ~dom_id:_ ~t_id () =
|
let on_init_thread ~dom_id:_ ~t_id () =
|
||||||
Trace.set_thread_name (Printf.sprintf "pool worker %d" t_id)
|
Trace.set_thread_name (Printf.sprintf "pool worker %d" t_id)
|
||||||
and around_task =
|
|
||||||
( (fun self -> Trace.counter_int "n_tasks" (Ws_pool.num_tasks self)),
|
|
||||||
fun self () -> Trace.counter_int "n_tasks" (Ws_pool.num_tasks self) )
|
|
||||||
in
|
in
|
||||||
|
|
||||||
match kind with
|
match kind with
|
||||||
| `Simple -> Fifo_pool.create ~num_threads:3 ~on_init_thread ~around_task ()
|
| `Simple -> Fifo_pool.create ~num_threads:3 ~on_init_thread ()
|
||||||
| `Ws_pool -> Ws_pool.create ~num_threads:3 ~on_init_thread ~around_task ()
|
| `Ws_pool -> Ws_pool.create ~num_threads:3 ~on_init_thread ()
|
||||||
in
|
in
|
||||||
|
|
||||||
(* make all threads busy *)
|
(* make all threads busy *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue