mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-09 20:55:31 -05:00
test for #94 (using Thread.yield to trigger segfault)
This commit is contained in:
parent
5e7cfed9b8
commit
126bb2f3f2
1 changed files with 4 additions and 4 deletions
|
|
@ -69,9 +69,9 @@ let with_acquire ~n t ~f =
|
|||
Thread.create (fun _ ->
|
||||
for _i = 1 to 100 do
|
||||
with_acquire ~n:(1 + (i mod 5)) s
|
||||
~f:(fun () -> CCLock.incr n)
|
||||
done
|
||||
) ())
|
||||
~f:(fun () -> Thread.yield(); CCLock.incr n)
|
||||
done)
|
||||
())
|
||||
in
|
||||
Array.iter Thread.join a;
|
||||
assert_equal ~printer:CCInt.to_string 5 (get s);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue