Compare commits

...

2 commits

Author SHA1 Message Date
Simon Cruanes
f68fc426b2
Merge 997d996c13 into d957f7b54e 2025-11-12 14:11:48 +00:00
Simon Cruanes
997d996c13
fix test 2025-11-12 09:10:52 -05:00

View file

@ -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 *)