Reads the value from the Ref
.
Reads the value from the Ref
.
UIO[A]
value from the Ref
Writes a new value to the RefM
, returning the value immediately before
modification.
Writes a new value to the RefM
, returning the value immediately before
modification.
value to be written to the RefM
UIO[A]
value of the RefM
immediately before modification
Atomically modifies the RefM
with the specified function, returning the
value immediately before modification.
Atomically modifies the RefM
with the specified function, returning the
value immediately before modification.
environment of the effect
error type
function to atomically modify the RefM
ZIO[R, E, A]
value of the RefM
immediately before modification
Atomically modifies the RefM
with the specified partial function,
returning the value immediately before modification.
Atomically modifies the RefM
with the specified partial function,
returning the value immediately before modification.
If the function is undefined on the current value it doesn't change it.
environment of the effect
error type
partial function to atomically modify the RefM
ZIO[R, E, A]
value of the RefM
immediately before modification
Atomically modifies the RefM
with the specified function, which computes
a return value for the modification.
Atomically modifies the RefM
with the specified function, which computes
a return value for the modification. This is a more powerful version of
update
.
environment of the effect
error type
type of the RefM
function which computes a return value for the modification
ZIO[R, E, B]
modified value of the RefM
Atomically modifies the RefM
with the specified function, which computes
a return value for the modification if the function is defined in the current value
otherwise it returns a default value.
Atomically modifies the RefM
with the specified function, which computes
a return value for the modification if the function is defined in the current value
otherwise it returns a default value.
This is a more powerful version of updateSome
.
environment of the effect
error type
type of the RefM
default value to be returned if the partial function is not defined on the current value
partial function to be computed on the current value if defined on the current value
ZIO[R, E, B]
modified value of the RefM
Writes a new value to the RefM
, with a guarantee of immediate
consistency (at some cost to performance).
Writes a new value to the RefM
, with a guarantee of immediate
consistency (at some cost to performance).
value to be written to the RefM
UIO[Unit]
Writes a new value to the Ref
without providing a guarantee of
immediate consistency.
Writes a new value to the Ref
without providing a guarantee of
immediate consistency.
value to be written to the RefM
UIO[Unit]
Atomically modifies the RefM
with the specified function.
Atomically modifies the RefM
with the specified function.
environment of the effect
error type
function to atomically modify the RefM
ZIO[R, E, Unit]
Atomically modifies the RefM
with the specified function, returning the
value immediately after modification.
Atomically modifies the RefM
with the specified function, returning the
value immediately after modification.
environment of the effect
error type
function to atomically modify the RefM
ZIO[R, E, A]
modified value of the RefM
Atomically modifies the RefM
with the specified partial function.
Atomically modifies the RefM
with the specified partial function.
If the function is undefined on the current value it doesn't change it.
environment of the effect
error type
partial function to atomically modify the RefM
ZIO[R, E, Unit]
Atomically modifies the RefM
with the specified partial function.
Atomically modifies the RefM
with the specified partial function.
If the function is undefined on the current value it returns the old value
without changing it.
environment of the effect
error type
partial function to atomically modify the RefM
ZIO[R, E, A]
modified value of the RefM
A mutable atomic reference for the
IO
monad. This is theIO
equivalent of a volatilevar
, augmented with atomic effectful operations, which make it useful as a reasonably efficient (if low-level) concurrency primitive.Unlike
Ref
,RefM
allows effects in atomic operations, which makes the structure slower but more powerful thanRef
.