An effectful function from A
to B
; when executed, it may update any number of Refs atomically. (It may also create new Refs.)
These functions are composable (see below), and composition preserves their atomicity. That is, all affected Refs will be updated atomically.
A Rxn forms an Arrow (more specifically, an ArrowChoice). It also forms a Monad in B
; however, consider using the arrow combinators (when possible) instead of flatMap
(since a static combination of Rxn
s may be more performant).
The relation between Rxn and Axn is approximately Rxn[A, B] ≡ (A => Axn[B])
; or, alternatively Axn[A] ≡ Rxn[Any, A]
.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Execute the Rxn with the specified input a
.
Execute the Rxn with the specified input a
.
This method is unsafe
because it performs side-effects.
Value parameters
- a
-
the input to the Rxn.
- maxBackoff
-
the maximal amount to spin when backing off (before retries).
- maxRetries
-
the maximum number of retries (pass
None
for possibly infinite retries). - mcas
-
the mcas.Mcas implementation to use.
- randomizeBackoff
-
whether to do exponential backoff *with* randomization.
Attributes
- Returns
-
the result of the executed Rxn.