- Up - | Next >> |
The module Value
contains two general control procedures.
Wait
{Value.wait
+X
}
blocks until X
is determined.
WaitOr
{Value.waitOr
X
Y
}
blocks until at least one of X
or Y
is determined.
!!
{Value.'!!'
X
Y
}
returns a future Y
for X
, i. e., a read-only placeholder for X
.
byNeed
{Value.byNeed
+P
X
}
creates a future X
. When X
is requested (i. e., some thread blocks on X
), the unary procedure P
is applied to a fresh variable Y
in a new thread. When the application of P
is fully reduced, the variable associated with X
is bound to Y
.
- Up - | Next >> |