From cfbcc726489d698a6db7f1f10e04914dbfbee826 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sun, 13 Aug 2023 22:47:54 -0400 Subject: [PATCH] improve a bit the resource test --- test/t_resource.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/t_resource.ml b/test/t_resource.ml index 2cdd7728..5845c520 100644 --- a/test/t_resource.ml +++ b/test/t_resource.ml @@ -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)