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

Function withEarlyRelease

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

Source from the content-addressed store, hash-verified

3030
3031/* @internal */
3032export const withEarlyRelease = <A, E, R>(
3033 self: Effect.Effect<A, E, R>
3034): Effect.Effect<[Effect.Effect<void>, A], E, R | Scope.Scope> =>
3035 scopeWith((parent) =>
3036 core.flatMap(core.scopeFork(parent, executionStrategy.sequential), (child) =>
3037 pipe(
3038 self,
3039 scopeExtend(child),
3040 core.map((value) => [
3041 core.fiberIdWith((fiberId) => core.scopeClose(child, core.exitInterrupt(fiberId))),
3042 value
3043 ])
3044 ))
3045 )
3046
3047/** @internal */
3048export 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…