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

Function runCallback

packages/effect/src/ManagedRuntime.ts:430–439  ·  view source on GitHub ↗
(
      effect: Effect.Effect<A, E, R>,
      options?: Effect.RunOptions & {
        readonly onExit: (exit: Exit.Exit<A, E | ER>) => void
      }
    )

Source from the content-addressed store, hash-verified

428 Effect.runForkWith(self.cachedContext)(effect, mergeRunOptions(options))
429 },
430 runCallback<A, E>(
431 effect: Effect.Effect<A, E, R>,
432 options?: Effect.RunOptions & {
433 readonly onExit: (exit: Exit.Exit<A, E | ER>) => void
434 }
435 ): (interruptor?: number | undefined) => void {
436 return self.cachedContext === undefined ?
437 Effect.runCallback(provide(self, effect), mergeRunOptions(options)) :
438 Effect.runCallbackWith(self.cachedContext)(effect, mergeRunOptions(options))
439 },
440 runSyncExit<A, E>(effect: Effect.Effect<A, E, R>): Exit.Exit<A, E | ER> {
441 return self.cachedContext === undefined ?
442 Effect.runSyncExit(provide(self, effect)) :

Callers

nothing calls this directly

Calls 2

mergeRunOptionsFunction · 0.85
provideFunction · 0.70

Tested by

no test coverage detected