FiberRefs

final class FiberRefs

FiberRefs is a data type that represents a collection of FiberRef values. This allows safely propagating FiberRef values across fiber boundaries, for example between an asynchronous producer and consumer.

Companion:
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def delete(fiberRef: FiberRef[_]): FiberRefs

Returns a new fiber refs with the specified ref deleted from it.

Returns a new fiber refs with the specified ref deleted from it.

def fiberRefs: Set[FiberRef[_]]

Returns a set of each FiberRef in this collection.

Returns a set of each FiberRef in this collection.

def forkAs(childId: Runtime): FiberRefs

Forks this collection of fiber refs as the specified child fiber id. This will potentially modify the value of the fiber refs, as determined by the individual fiber refs that make up the collection.

Forks this collection of fiber refs as the specified child fiber id. This will potentially modify the value of the fiber refs, as determined by the individual fiber refs that make up the collection.

def get[A](fiberRef: FiberRef[A]): Option[A]

Gets the value of the specified FiberRef in this collection of FiberRef values if it exists or None otherwise.

Gets the value of the specified FiberRef in this collection of FiberRef values if it exists or None otherwise.

def getOrDefault[A](fiberRef: FiberRef[A]): A

Gets the value of the specified FiberRef in this collection of FiberRef values if it exists or the initial value of the FiberRef otherwise.

Gets the value of the specified FiberRef in this collection of FiberRef values if it exists or the initial value of the FiberRef otherwise.

def joinAs(fiberId: Runtime)(that: FiberRefs): FiberRefs

Joins this collection of fiber refs to the specified collection, as the specified fiber id. This will perform diffing and merging to ensure preservation of maximum information from both child and parent refs.

Joins this collection of fiber refs to the specified collection, as the specified fiber id. This will perform diffing and merging to ensure preservation of maximum information from both child and parent refs.

def setAll(implicit trace: Trace): UIO[Unit]
final override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Returns:

a string representation of the object.

Definition Classes
Any
def updatedAs[A](fiberId: Runtime)(fiberRef: FiberRef[A], value: A): FiberRefs