Package: effect
Module: FiberSet
Joins all fibers in the FiberSet. If any fiber in the set terminates with a failure, the returned Effect will terminate with the first failure that occurred.
Example (Joining failing fibers)
import { Effect, FiberSet } from "effect"
Effect.gen(function*() {
const set = yield* FiberSet.make()
yield* FiberSet.add(set, Effect.runFork(Effect.fail("error")))
// parent fiber will fail with "error"
yield* FiberSet.join(set)
})
Signature
declare const join: <A, E>(self: FiberSet<A, E>) => Effect.Effect<void, E>
Since v2.0.0