mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-05 19:00:33 -05:00
tweak: guess of chunk_size in Fork_join
This commit is contained in:
parent
2326ae0078
commit
f081c0f8ad
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ let for_ ?chunk_size n (f : int -> int -> unit) : unit =
|
|||
| Some cs -> max 1 (min n cs)
|
||||
| None ->
|
||||
(* guess: try to have roughly one task per core *)
|
||||
max 1 (n / Domain_.recommended_number ())
|
||||
max 1 (1 + (n / D_pool_.n_domains ()))
|
||||
in
|
||||
|
||||
let start_tasks ~run (suspension : Suspend_.suspension) =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue