mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-12 05:58:42 -05:00
11 lines
236 B
OCaml
11 lines
236 B
OCaml
let num_threads ?num_threads () : int =
|
|
let n_domains = Domain_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
|