MCPcopy Index your code
hub / github.com/Effect-TS/effect / disconnect

Function disconnect

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

Source from the content-addressed store, hash-verified

3548
3549/** @internal */
3550export const disconnect = <A, E, R>(self: Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>
3551 core.uninterruptibleMask((restore) =>
3552 core.fiberIdWith((fiberId) =>
3553 core.flatMap(forkDaemon(restore(self)), (fiber) =>
3554 pipe(
3555 restore(internalFiber.join(fiber)),
3556 core.onInterrupt(() => pipe(fiber, internalFiber.interruptAsFork(fiberId)))
3557 ))
3558 )
3559 )
3560
3561/** @internal */
3562export 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