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

Function withEarlyRelease

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

Source from the content-addressed store, hash-verified

3040
3041/* @internal */
3042export const withEarlyRelease = <A, E, R>(
3043 self: Effect.Effect<A, E, R>
3044): Effect.Effect<[Effect.Effect<void>, A], E, R | Scope.Scope> =>
3045 scopeWith((parent) =>
3046 core.flatMap(core.scopeFork(parent, executionStrategy.sequential), (child) =>
3047 pipe(
3048 self,
3049 scopeExtend(child),
3050 core.map((value) => [
3051 core.fiberIdWith((fiberId) => core.scopeClose(child, core.exitInterrupt(fiberId))),
3052 value
3053 ])
3054 ))
3055 )
3056
3057/** @internal */
3058export const zipOptions = dual<

Callers

nothing calls this directly

Calls 3

scopeWithFunction · 0.85
pipeFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected