moonpool/src/moonpool.ml
2023-06-10 00:21:46 -04:00

8 lines
241 B
OCaml

let start_thread_on_some_domain f x =
let did = Random.int (D_pool_.n_domains ()) in
D_pool_.run_on_and_wait did (fun () -> Thread.create f x)
module Pool = Pool
module Fut = Fut
module Blocking_queue = Bb_queue
module Atomic = Atomic_