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

Function disconnect

packages/effect/src/internal/fiberRuntime.ts:3560–3569  ·  view source on GitHub ↗
(self: Effect.Effect<A, E, R>)

Source from the content-addressed store, hash-verified

3558
3559/** @internal */
3560export const disconnect = <A, E, R>(self: Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>
3561 core.uninterruptibleMask((restore) =>
3562 core.fiberIdWith((fiberId) =>
3563 core.flatMap(forkDaemon(restore(self)), (fiber) =>
3564 pipe(
3565 restore(internalFiber.join(fiber)),
3566 core.onInterrupt(() => pipe(fiber, internalFiber.interruptAsFork(fiberId)))
3567 ))
3568 )
3569 )
3570
3571/** @internal */
3572export const race = dual<

Callers

nothing calls this directly

Calls 5

restoreFunction · 0.85
forkDaemonFunction · 0.70
pipeFunction · 0.70
joinMethod · 0.65
interruptAsForkMethod · 0.65

Tested by

no test coverage detected