MCPcopy Create free account
hub / github.com/Effect-TS/effect / fiberJoin

Function fiberJoin

packages/effect/src/internal/effect.ts:971–978  ·  view source on GitHub ↗
(self: Fiber.Fiber<A, E>)

Source from the content-addressed store, hash-verified

969
970/** @internal */
971export const fiberJoin = <A, E>(self: Fiber.Fiber<A, E>): Effect.Effect<A, E> => {
972 const impl = self as FiberImpl<A, E>
973 if (impl._exit) return impl._exit
974 return callbackNoSignal((resume) => {
975 if (impl._exit) return resume(impl._exit)
976 return sync(self.addObserver(resume))
977 }, impl)
978}
979
980/** @internal */
981export const fiberJoinAll = <A extends Iterable<Fiber.Fiber<any, any>>>(self: A): Effect.Effect<

Callers 2

joinFunction · 0.85
effect.tsFile · 0.85

Calls 4

callbackNoSignalFunction · 0.85
addObserverMethod · 0.80
resumeFunction · 0.50
syncFunction · 0.50

Tested by

no test coverage detected