package tezos-dal-node-lib

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

Module Worker.StreamSource

A mutable (FIFO) stream of data.

Sourcetype 'a t

The stream data structure.

Sourceval empty : unit -> 'a t

Create a new empty stream.

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

Push the given value into the stream.

Sourceval 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.

Sourceval get_available : 'a t -> 'a list

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

Sourceval length : 'a t -> int

Returns the number of elements in the stream.

OCaml

Innovation. Community. Security.