package b0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0
doc/b0.std/B0_std/Bval/index.html
Module B0_std.Bval
Source
Blocking values.
Note. In direct style the Fut.t
values would go away. For now be bundled lazy blocking values in the same structure.
Note. This is an IVar.
The type for setting blocking value.
The type for immutable blocking values.
Setting
set s v
sets the blocking value of_setter s
to value v
. Raises Invalid_argument
if set
is already set.
try_set s v
is true
if iv
was set to v
and false
if iv
was already set.
try_set' s f
is true
if iv
was set to f ()
and false
if iv
was already set, in the latter case f
may be or may not have been called.
Getting
get bv
is the value of bv
. In direct style, this should be a blocking call.
poll bv
is None
if get bv
would block and Some _
if it does not block. If bv
was created with of_lazy_fun
, this ensure the computation gets triggered.
stir bv
is ignore (poll v)
. Useful if you know bv
will be needed later and may be a of_lazy_fun
.