mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-07 19:55:39 -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)
|
| Some cs -> max 1 (min n cs)
|
||||||
| None ->
|
| None ->
|
||||||
(* guess: try to have roughly one task per core *)
|
(* guess: try to have roughly one task per core *)
|
||||||
max 1 (n / Domain_.recommended_number ())
|
max 1 (1 + (n / D_pool_.n_domains ()))
|
||||||
in
|
in
|
||||||
|
|
||||||
let start_tasks ~run (suspension : Suspend_.suspension) =
|
let start_tasks ~run (suspension : Suspend_.suspension) =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue