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

Function fork

packages/effect/src/Micro.ts:4107–4113  ·  view source on GitHub ↗
(
  self: Micro<A, E, R>
)

Source from the content-addressed store, hash-verified

4105 * @category fiber & forking
4106 */
4107export const fork = <A, E, R>(
4108 self: Micro<A, E, R>
4109): Micro<MicroFiber<A, E>, never, R> =>
4110 withMicroFiber((fiber) => {
4111 fiberMiddleware.interruptChildren ??= fiberInterruptChildren
4112 return succeed(unsafeFork(fiber, self))
4113 })
4114
4115const unsafeFork = <FA, FE, A, E, R>(
4116 parent: MicroFiberImpl<FA, FE>,

Callers

nothing calls this directly

Calls 2

unsafeForkFunction · 0.70
succeedFunction · 0.50

Tested by

no test coverage detected