diff --git a/test/Multicore_magic_test.ml b/test/Multicore_magic_test.ml index 4b8ef6e..03e9f10 100644 --- a/test/Multicore_magic_test.ml +++ b/test/Multicore_magic_test.ml @@ -119,6 +119,8 @@ let test_instantaneous_domain_index () = in let domain () = + Random.self_init (); + Atomic.incr num_started; (* [Domain.DLS] is not thread-safe so it might be necessary to make sure we get the index before spawning threads: *) @@ -136,6 +138,8 @@ let test_instantaneous_domain_index () = Atomic.incr num_exited in + Random.self_init (); + let threads = Array.init n_domains @@ fun _ -> ()