From c9b1caaa5516d616e400faa7a7c0278c8677c51c Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 13 Mar 2014 15:41:44 +0100 Subject: STM: move out a couple of submodules These modules are not as reusable as one may want them to be, but moving them out simplifies a little STM. --- lib/workerPool.mli | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lib/workerPool.mli (limited to 'lib/workerPool.mli') diff --git a/lib/workerPool.mli b/lib/workerPool.mli new file mode 100644 index 0000000000..d7a546929f --- /dev/null +++ b/lib/workerPool.mli @@ -0,0 +1,30 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* ?env:string array -> string -> string array -> + process * in_channel * out_channel +end) : sig + +type worker_id = int +type spawn = + args:string array -> env:string array -> unit -> + in_channel * out_channel * Worker.process + +val init : + size:int -> manager:(cancel:bool ref -> worker_id -> spawn -> unit) -> unit +val is_empty : unit -> bool +val n_workers : unit -> int +val cancel : worker_id -> unit + +(* The worker should call this function *) +val worker_handshake : in_channel -> out_channel -> unit + +end -- cgit v1.2.3