diff options
| author | Enrico Tassi | 2014-01-29 23:08:45 +0100 |
|---|---|---|
| committer | Enrico Tassi | 2014-01-30 17:29:33 +0100 |
| commit | 8c4b6ebb338c8a61c607782908254aadead0c3cd (patch) | |
| tree | 2cf4c79b5911c1853bcdd16cbe6d9ca3bab686f3 /lib/cThread.mli | |
| parent | 0a61e18a60fe05b989c24f28c769c3b0cd296cf1 (diff) | |
Work around for bug in threads + blocking io streamlined
Diffstat (limited to 'lib/cThread.mli')
| -rw-r--r-- | lib/cThread.mli | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/cThread.mli b/lib/cThread.mli new file mode 100644 index 0000000000..6c635748e9 --- /dev/null +++ b/lib/cThread.mli @@ -0,0 +1,21 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2012 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +(* As of OCaml 4.01.0 input_value and input do not quite work well + * with threads. The symptom is the following. Two threads, each + * of them blocked on a read (on different channels). One is not + * woken up even if data is available. When the other one gets data + * then the stuck one is eventually unblocked too. Unix.select with + * an unbounded wait has the same problem. *) + +(* Use only the following functions on the channel *) +val prepare_in_channel_for_thread_friendly_io : in_channel -> unit +val thread_friendly_input_value : in_channel -> 'a +val thread_friendly_read : + in_channel -> string -> off:int -> len:int -> int + |
