package kcas_data

  1. Overview
  2. Docs

Explicit transaction passing on synchronizing variables.

val is_empty : xt:'x Kcas.Xt.t -> 'a t -> bool

is_empty mv determines whether the synchronizing variable mv contains a value or not.

val put : xt:'x Kcas.Xt.t -> 'a t -> 'a -> unit

put mv x fills the synchronizing variable mv with the value v or blocks until the variable becomes empty.

val try_put : xt:'x Kcas.Xt.t -> 'a t -> 'a -> bool

try_put mv x tries to fill the synchronizing variable mv with the value v and returns true on success or false in case the variable is full.

val take : xt:'x Kcas.Xt.t -> 'a t -> 'a

take mv removes and returns the current value of the synchronizing variable mv or blocks waiting until the variable is filled.

val take_opt : xt:'x Kcas.Xt.t -> 'a t -> 'a option

take_opt mv removes and returns the current value of the synchronizing variable mv or returns None in case the variable is empty.

val peek : xt:'x Kcas.Xt.t -> 'a t -> 'a

peek mv returns the current value of the synchronizing variable mv or blocks waiting until the variable is filled.

val peek_opt : xt:'x Kcas.Xt.t -> 'a t -> 'a option

peek_opt mv returns the current value of the synchronizing variable mv or returns None in case the variable is empty.