mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-12 14:00:41 -05:00
11 lines
231 B
OCaml
11 lines
231 B
OCaml
let num_threads ?num_threads () : int =
|
|
let n_domains = D_pool_.n_domains () in
|
|
|
|
(* number of threads to run *)
|
|
let num_threads =
|
|
match num_threads with
|
|
| Some j -> max 1 j
|
|
| None -> n_domains
|
|
in
|
|
|
|
num_threads
|