Proxy
Wraps another FiberRef
and delegates all operations to it. Extend this if you need a FiberRef
with some specific behavior overridden.
Attributes
- Graph
-
- Supertypes
- Known subtypes
-
class TrackingFiberRef[A]
Members list
Type members
Types
The type of the patch that describes updates to the value of the FiberRef
. In the simple case this will just be a function that sets the value of the FiberRef
. In more complex cases this will describe an update to a piece of a whole value, allowing updates to the value by different fibers to be combined in a compositional way when those fibers are joined.
The type of the patch that describes updates to the value of the FiberRef
. In the simple case this will just be a function that sets the value of the FiberRef
. In more complex cases this will describe an update to a piece of a whole value, allowing updates to the value by different fibers to be combined in a compositional way when those fibers are joined.
Attributes
Value members
Concrete methods
Combines two patches to produce a new patch that describes the updates of the first patch and then the updates of the second patch. The combine operation should be associative. In addition, if the combine operation is commutative then joining multiple fibers concurrently will result in deterministic FiberRef
values.
Combines two patches to produce a new patch that describes the updates of the first patch and then the updates of the second patch. The combine operation should be associative. In addition, if the combine operation is commutative then joining multiple fibers concurrently will result in deterministic FiberRef
values.
Attributes
- Definition Classes
Constructs a patch describing the updates to a value from an old value and a new value.
Constructs a patch describing the updates to a value from an old value and a new value.
Attributes
- Definition Classes
The initial patch that is applied to the value of the FiberRef
when a new fiber is forked.
The initial patch that is applied to the value of the FiberRef
when a new fiber is forked.
Attributes
- Definition Classes
The initial value of the FiberRef
.
Applies a patch to an old value to produce a new value that is equal to the old value with the updates described by the patch.
Applies a patch to an old value to produce a new value that is equal to the old value with the updates described by the patch.
Attributes
- Definition Classes
Inherited methods
Returns a ThreadLocal
that can be used to interact with this FiberRef
from side effecting code.
Returns a ThreadLocal
that can be used to interact with this FiberRef
from side effecting code.
This feature is meant to be used for integration with side effecting code, that needs to access fiber specific data, like MDC contexts and the like. The returned ThreadLocal
will be backed by this FiberRef
on all threads that are currently managed by ZIO when this feature is enabled using Runtime.enableCurrentFiber, and behave like an ordinary ThreadLocal
on all other threads.
Attributes
- Inherited from:
- FiberRef
Reads the value associated with the current fiber. Returns initial value if no value was set
or inherited from parent.
Reads the value associated with the current fiber. Returns initial value if no value was set
or inherited from parent.
Attributes
- Inherited from:
- FiberRef
Atomically sets the value associated with the current fiber and returns the old value.
Atomically sets the value associated with the current fiber and returns the old value.
Attributes
- Inherited from:
- FiberRef
Atomically modifies the FiberRef
with the specified function and returns the old value.
Atomically modifies the FiberRef
with the specified function and returns the old value.
Attributes
- Inherited from:
- FiberRef
Atomically modifies the FiberRef
with the specified partial function and returns the old value. If the function is undefined on the current value it doesn't change it.
Atomically modifies the FiberRef
with the specified partial function and returns the old value. If the function is undefined on the current value it doesn't change it.
Attributes
- Inherited from:
- FiberRef
Gets the value associated with the current fiber and uses it to run the specified effect.
Gets the value associated with the current fiber and uses it to run the specified effect.
Attributes
- Inherited from:
- FiberRef
Returns a ZIO
that runs with value
bound to the current fiber.
Returns a ZIO
that runs with value
bound to the current fiber.
Guarantees that fiber data is properly restored via acquireRelease
.
Attributes
- Inherited from:
- FiberRef
Returns a scoped workflow that sets the value associated with the curent fiber to the specified value and restores it to its original value when the scope is closed.
Returns a scoped workflow that sets the value associated with the curent fiber to the specified value and restores it to its original value when the scope is closed.
Attributes
- Inherited from:
- FiberRef
Returns a scoped workflow that updates the value associated with the current fiber using the specified function and restores it to its original value when the scope is closed.
Returns a scoped workflow that updates the value associated with the current fiber using the specified function and restores it to its original value when the scope is closed.
Attributes
- Inherited from:
- FiberRef
Returns a ZIO
that runs with f
applied to the current fiber.
Returns a ZIO
that runs with f
applied to the current fiber.
Guarantees that fiber data is properly restored via acquireRelease
.
Attributes
- Inherited from:
- FiberRef
Atomically modifies the FiberRef
with the specified function, which computes a return value for the modification. This is a more powerful version of update
.
Atomically modifies the FiberRef
with the specified function, which computes a return value for the modification. This is a more powerful version of update
.
Attributes
- Inherited from:
- FiberRef
Atomically modifies the FiberRef
with the specified partial 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
.
Atomically modifies the FiberRef
with the specified partial 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
.
Attributes
- Inherited from:
- FiberRef
Sets the value associated with the current fiber.
Atomically modifies the FiberRef
with the specified function.
Atomically modifies the FiberRef
with the specified function and returns the result.
Atomically modifies the FiberRef
with the specified function and returns the result.
Attributes
- Inherited from:
- FiberRef
Atomically modifies the FiberRef
with the specified partial function. If the function is undefined on the current value it doesn't change it.
Atomically modifies the FiberRef
with the specified partial function. If the function is undefined on the current value it doesn't change it.
Attributes
- Inherited from:
- FiberRef
Atomically modifies the FiberRef
with the specified partial function. If the function is undefined on the current value it returns the old value without changing it.
Atomically modifies the FiberRef
with the specified partial function. If the function is undefined on the current value it returns the old value without changing it.
Attributes
- Inherited from:
- FiberRef