opentelemetry-client.sync
Opentelemetry_client_sync.Sync_queue
Simple blocking queue
opentelemetry-client
opentelemetry-client.lwt
type 'a t
val create : unit -> _ t
exception Closed
val push : 'a t -> 'a -> unit
push q x pushes x into q, and returns ().
push q x
x
q
()
Closed
if close q was previously called.
close q
val pop : 'a t -> 'a
pop q pops the next element in q. It might block until an element comes.
pop q
if the queue was closed before a new element was available.
val pop_all : 'a t -> 'a Queue.t -> unit
pop_all q into pops all the elements of q and moves them into into. if no element is available, it will block until it successfully transfers at least one item to into.
pop_all q into
into
val close : _ t -> unit
Close the queue, meaning there won't be any more push allowed.
push