From f9a6efbb2647e7856c34966fd7bcc00a1d8fbc4d Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 11 Dec 2014 14:29:47 +0100 Subject: TQueue: a way to unblock threads begin destroyed waiting on pop --- stm/tQueue.mli | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stm/tQueue.mli') diff --git a/stm/tQueue.mli b/stm/tQueue.mli index 5ee2cf99c..9cd651f4a 100644 --- a/stm/tQueue.mli +++ b/stm/tQueue.mli @@ -10,10 +10,11 @@ type 'a t val create : unit -> 'a t -val pop : ?picky:('a -> bool) -> 'a t -> 'a +val pop : ?picky:('a -> bool) -> ?destroy:bool ref -> 'a t -> 'a val push : 'a t -> 'a -> unit val set_order : 'a t -> ('a -> 'a -> int) -> unit val wait_until_n_are_waiting_and_queue_empty : int -> 'a t -> unit +val signal_destruction : 'a t -> unit (* Non destructive *) val wait_until_n_are_waiting_then_snapshot : int -> 'a t -> 'a list -- cgit v1.2.3