package octez-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A mutable (FIFO) stream of data.

type 'a t

The stream data structure.

val empty : unit -> 'a t

Create a new empty stream.

val push : 'a -> 'a t -> unit

Push the given value into the stream.

val pop : 'a t -> 'a Monad.t

Pops the oldest value that has been pushed to the stream. In case the stream is empty, the function will wait until some value is pushed.

val get_available : 'a t -> 'a list

Returns and removes all available elements of the stream l without blocking.

val length : 'a t -> int

Returns the number of elements in the stream.

OCaml

Innovation. Community. Security.