mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-10 05:03:58 -05:00
improve a bit the resource test
This commit is contained in:
parent
ed531e68e1
commit
cfbcc72648
1 changed files with 3 additions and 0 deletions
|
|
@ -6,6 +6,9 @@ let ( let@ ) = ( @@ )
|
|||
let () =
|
||||
let a = Atomic.make 0 in
|
||||
for _i = 1 to 1_000 do
|
||||
(* give a chance to domains to die *)
|
||||
if _i mod 100 = 0 then Thread.delay 0.8;
|
||||
|
||||
(* allocate a new pool at each iteration *)
|
||||
let@ p = Pool.with_ ~min:4 () in
|
||||
Pool.run_wait_block p (fun () -> Atomic.incr a)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue