diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1997-05-15 13:27:04 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1997-05-15 13:27:04 +0000 |
commit | 553ad406297bc50342e60d2aa434ef93116e3c87 (patch) | |
tree | bab535a3becb401bb8198656a1b47528ca971c33 | |
parent | 5f13aa1f5ed71e746e24455b99b4cd12fd5c7d92 (diff) |
Remise a jour.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1556 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | otherlibs/threads/Tests/torture.ml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/otherlibs/threads/Tests/torture.ml b/otherlibs/threads/Tests/torture.ml index 48f58b2cc..8d60e6854 100644 --- a/otherlibs/threads/Tests/torture.ml +++ b/otherlibs/threads/Tests/torture.ml @@ -17,14 +17,15 @@ let writer_thread (oc, size) = while true do (* print_string "writer "; print_int size; print_newline(); *) let buff = String.make size 'a' in - Unix.write oc buff 0 size + ThreadUnix.write oc buff 0 size done let reader_thread (ic, size) = while true do (* print_string "reader "; print_int size; print_newline(); *) let buff = String.create size in - let n = Unix.read ic buff 0 size in + let n = ThreadUnix.read ic buff 0 size in +(* print_string "reader "; print_int n; print_newline(); *) for i = 0 to n-1 do if buff.[i] <> 'a' then prerr_endline "error in reader_thread" done @@ -32,10 +33,10 @@ let reader_thread (ic, size) = let main() = Thread.create gc_thread (); - let (out1, in1) = Unix.pipe() in + let (out1, in1) = ThreadUnix.pipe() in Thread.create writer_thread (in1, 4096); Thread.create reader_thread (out1, 4096); - let (out2, in2) = Unix.pipe() in + let (out2, in2) = ThreadUnix.pipe() in Thread.create writer_thread (in2, 16); Thread.create reader_thread (out2, 16); stdin_thread() |