Interrupts the fiber with a list of error(s).
Joins the fiber, with suspends the joining fiber until the result of the fiber has been determined.
Joins the fiber, with suspends the joining fiber until the result of the fiber has been determined. Attempting to join a fiber that has been or is killed before producing its result will result in a catchable error.
Add an exit handler for when the fiber terminates and receive information on whether the fiber terminated normally, with unhandled error, or with exception.
Add an exit handler for when the fiber terminates and receive information on whether the fiber terminated normally, with unhandled error, or with exception.
The specified action will be invoked after the fiber has finished running (including all finalizers). If the specified action throws an exception, it will be reported to the parent fiber's unhandled error handler.
Same as zip
but discards the output of the left hand side.
Same as zip
but discards the output of the right hand side.
Interrupts the fiber with the specified error(s).
Interrupts the fiber with the specified error(s). If the fiber has already terminated, either successfully or with error, this will resume immediately. Otherwise, it will resume when the fiber has been successfully interrupted or has produced its result.
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 has been successfully interrupted or has produced its result.
Maps over the value the Fiber computes.
Zips this fiber and the specified fiber togther, producing a tuple of their output.
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