diff options
| author | Enrico Tassi | 2014-10-08 13:58:14 +0200 |
|---|---|---|
| committer | Enrico Tassi | 2014-10-13 18:13:20 +0200 |
| commit | 6c2d8c3026c1baeb0ff731907747a9c216d60400 (patch) | |
| tree | 6a2fd8fcd755882bbcc515ba254a62edc0e04854 /stm/tQueue.mli | |
| parent | bce50a4e984a4aaf4f6582f079d7c4bddf4d1ff8 (diff) | |
TQueue: new primitive to take a snapshot of the queue
Diffstat (limited to 'stm/tQueue.mli')
| -rw-r--r-- | stm/tQueue.mli | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/stm/tQueue.mli b/stm/tQueue.mli index c006b6a867..abb14f969d 100644 --- a/stm/tQueue.mli +++ b/stm/tQueue.mli @@ -14,7 +14,13 @@ val pop : '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 + +(* also empties the queue *) val dump : 'a t -> 'a list + +(* Non destructive *) +val wait_until_n_are_waiting_then_snapshot : int -> 'a t -> 'a list + val clear : 'a t -> unit val is_empty : 'a t -> bool |
