package trace

  1. Overview
  2. Docs

Module Trace_private_util.B_queueSource

Basic Blocking Queue

Sourcetype 'a t
Sourceval create : unit -> _ t
Sourceexception Closed
Sourceval push : 'a t -> 'a -> unit

push q x pushes x into q, and returns ().

  • raises Closed

    if close q was previously called.

Sourceval pop_all : 'a t -> 'a list

pop_all bq returns all items presently in bq, in the same order, and clears bq. It blocks if no element is in bq.

Sourceval close : _ t -> unit

Close the queue, meaning there won't be any more push allowed.

OCaml

Innovation. Community. Security.