diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2013-06-14 08:07:08 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2013-06-14 08:07:08 +0000 |
commit | 94381ab7748cb31fb6bb8e7d742b327d179caa2c (patch) | |
tree | fb32a451d85dfb9e042651646ed266075fcd5a65 | |
parent | e680af3602075fab97ca71ce413a1283d2dc5ca1 (diff) |
As originally written, this test would livelock under Linux because of contention on the output lock.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13778 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | testsuite/tests/lib-threads/test4.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testsuite/tests/lib-threads/test4.ml b/testsuite/tests/lib-threads/test4.ml index 90692c9a0..7fb789c76 100644 --- a/testsuite/tests/lib-threads/test4.ml +++ b/testsuite/tests/lib-threads/test4.ml @@ -16,8 +16,9 @@ let rec fib n = if n <= 2 then 1 else fib(n-1) + fib(n-2) let fibtask n = while true do + let res = fib n in Mutex.lock output_lock; - print_int(fib n); print_newline(); + print_int res; print_newline(); Mutex.unlock output_lock done |