Mvar.Xt
Explicit transaction passing on synchronizing variables.
is_empty mv
determines whether the synchronizing variable mv
contains a value or not.
put mv x
fills the synchronizing variable mv
with the value v
or blocks until the variable becomes empty.
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.
take mv
removes and returns the current value of the synchronizing variable mv
or blocks waiting until the variable is filled.
take_opt mv
removes and returns the current value of the synchronizing variable mv
or returns None
in case the variable is empty.
peek mv
returns the current value of the synchronizing variable mv
or blocks waiting until the variable is filled.