Build a new activity by applying f
to each value.
Build a new activity by applying f
to each value. When
f
is not defined for this activity's current value, the derived
activity becomes pending.
The activity which behaves as f
applied to Ok values.
Recover a failed activity.
Join two activities.
Map a T-typed activity to a U-typed one.
Map the states of a T-typed activity to a U-typed one.
Sample the current value of this activity.
Sample the current value of this activity. Sample throws an exception if the activity is in pending state or has failed.
Stabilize the value of this activity such that once an Ok value has been returned it stops error propagation and instead returns the last Ok value.
An Event of states.
The activity which behaves as f
to the state
of this activity.
An Event containing only nonpending values.
An Activity is a handle to a concurrently running process, producing T-typed values. An activity is in one of three states:
An activity may transition between any state at any time.
(The observant reader will notice that this is really a monad transformer for an Op monad over Var where Op is like a Try with an additional pending state.)