summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-04-12 18:43:59 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-04-12 18:43:59 +0100
commit5b414f581f1e40f91e44914776b119ce3ef6594c (patch)
tree683aa2f6651edcc1776d379e955457e8db163dd9
parent681377f1b274cba0a4881ad18ccf200b9a014e94 (diff)
downloadlibguestfs-5b414f581f1e40f91e44914776b119ce3ef6594c.tar.gz
libguestfs-5b414f581f1e40f91e44914776b119ce3ef6594c.tar.xz
libguestfs-5b414f581f1e40f91e44914776b119ce3ef6594c.zip
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).
-rw-r--r--ocaml/t/guestfs_070_threads.ml3
1 files changed, 2 insertions, 1 deletions
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
) ()