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

Function unsafeFork

packages/effect/src/internal/fiberRuntime.ts:2457–2466  ·  view source on GitHub ↗
(
  effect: Effect.Effect<A, E, R>,
  parentFiber: FiberRuntime<B, E2>,
  parentRuntimeFlags: RuntimeFlags.RuntimeFlags,
  overrideScope: fiberScope.FiberScope | null = null
)

Source from the content-addressed store, hash-verified

2455
2456/** @internal */
2457export const unsafeFork = <A, E, R, E2, B>(
2458 effect: Effect.Effect<A, E, R>,
2459 parentFiber: FiberRuntime<B, E2>,
2460 parentRuntimeFlags: RuntimeFlags.RuntimeFlags,
2461 overrideScope: fiberScope.FiberScope | null = null
2462): FiberRuntime<A, E> => {
2463 const childFiber = unsafeMakeChildFiber(effect, parentFiber, parentRuntimeFlags, overrideScope)
2464 childFiber.resume(effect)
2465 return childFiber
2466}
2467
2468/** @internal */
2469export const unsafeForkUnstarted = <A, E, R, E2, B>(

Callers 4

forkFunction · 0.70
forkWithScopeOverrideFunction · 0.70
raceAllFunction · 0.70
runtime.tsFile · 0.70

Calls 2

unsafeMakeChildFiberFunction · 0.85
resumeMethod · 0.80

Tested by

no test coverage detected