From 5b414f581f1e40f91e44914776b119ce3ef6594c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 12 Apr 2012 18:43:59 +0100 Subject: extra-tests: ocaml: Use a short delay instead of Thread.yield. On the new faster computer, Thread.yield wasn't yielding, so the second thread would block the main test from proceeding (only when run under valgrind however). --- ocaml/t/guestfs_070_threads.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ocaml/t/guestfs_070_threads.ml b/ocaml/t/guestfs_070_threads.ml index 414b0232..8b22f938 100644 --- a/ocaml/t/guestfs_070_threads.ml +++ b/ocaml/t/guestfs_070_threads.ml @@ -25,7 +25,8 @@ let thread = Thread.create ( fun () -> while true do Gc.compact (); - ignore (Array.init 1000 (fun i -> Thread.yield (); String.create (8*i))) + ignore (Array.init 1000 (fun i -> String.create (8*i))); + Thread.delay 0.001 done ) () -- cgit