Awaits the fiber, which suspends the awaiting fiber until the result of the fiber has been determined.
Inherits values from all FiberRef instances into current fiber.
Inherits values from all FiberRef instances into current fiber. This will resume immediately.
Interrupts the fiber with no specified reason.
Interrupts the fiber with no specified reason. If the fiber has already terminated, either successfully or with error, this will resume immediately. Otherwise, it will resume when the fiber terminates.
Tentatively observes the fiber, but returns immediately if it is not already done.
Same as zip
but discards the output of the left hand side.
Same as zip
but discards the output of the right hand side.
Zips this fiber and the specified fiber together, producing a tuple of their output.
Maps the output of this fiber to the specified constant.
Joins the fiber, which suspends the joining fiber until the result of the fiber has been determined.
Joins the fiber, which suspends the joining fiber until the result of the fiber has been determined. Attempting to join a fiber that has errored will result in a catchable error, _if_ that error does not result from interruption.
Maps over the value the Fiber computes.
Returns a fiber that prefers this
fiber, but falls back to the
that
one when this
one fails.
Returns a fiber that prefers this
fiber, but falls back to the
that
one when this
one fails.
Interrupt call on such a fiber interrupts both (this
and that
)
fibers in sequential order.
Converts this fiber into a scala.concurrent.Future.
Converts this fiber into a scala.concurrent.Future, translating any errors to java.lang.Throwable with the specified conversion function.
Converts this fiber into a zio.ZManaged.
Converts this fiber into a zio.ZManaged. Fiber is interrupted on release.
Maps the output of this fiber to ()
.
Named alias for <*>
.
Named alias for <*
.
Named alias for *>
.
Zips this fiber with the specified fiber, combining their results using the specified combiner function.
Zips this fiber with the specified fiber, combining their results using the specified combiner function. Both joins and interruptions are performed in sequential order from left to right.
A fiber is a lightweight thread of execution that never consumes more than a whole thread (but may consume much less, depending on contention). Fibers are spawned by forking
IO
actions, which, conceptually at least, runs them concurrently with the parentIO
action.Fibers can be joined, yielding their result other fibers, or interrupted, which terminates the fiber with a runtime error.
Fork-Join Identity: fork >=> join = id