Type
Fiber<A, E> represents a computation that may succeed with a value of type A or fail with an error of type E.
RuntimeFiber
Creating Fibers
fork
Forks an effect into a new fiber.succeed
Creates a fiber that has already succeeded with a value.fail
Creates a fiber that has already failed with an error.done
Creates a fiber that is done with the specifiedExit value.
Awaiting Fibers
await
Awaits the fiber, suspending the awaiting fiber until the result has been determined.join
Joins the fiber, suspending until the result is determined. Attempting to join a fiber that has erred will result in a catchable error.joinAll
Joins all fibers, awaiting their successful completion.poll
Tentatively observes the fiber, but returns immediately if not already done.Interrupting Fibers
interrupt
Interrupts the fiber. If the fiber has already exited, the effect resumes immediately.interruptFork
Interrupts the fiber in a separate daemon fiber, returning immediately without waiting.interruptAll
Interrupts all fibers, awaiting their interruption.Fiber Composition
zip
Zips two fibers together, producing a tuple of their outputs.zipWith
Zips two fibers with a combiner function.orElse
Returns a fiber that prefersthis fiber, but falls back to that one when this fails.
Fiber Inspection
id
Gets the identity of the fiber.status
Gets theFiberStatus of a RuntimeFiber.