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

Function runCallback

packages/effect/src/ManagedRuntime.ts:352–361  ·  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

350 Effect.runForkWith(self.cachedContext)(effect, mergeRunOptions(options))
351 },
352 runCallback<A, E>(
353 effect: Effect.Effect<A, E, R>,
354 options?: Effect.RunOptions & {
355 readonly onExit: (exit: Exit.Exit<A, E | ER>) => void
356 }
357 ): (interruptor?: number | undefined) => void {
358 return self.cachedContext === undefined ?
359 Effect.runCallback(provide(self, effect), mergeRunOptions(options)) :
360 Effect.runCallbackWith(self.cachedContext)(effect, mergeRunOptions(options))
361 },
362 runSyncExit<A, E>(effect: Effect.Effect<A, E, R>): Exit.Exit<A, E | ER> {
363 return self.cachedContext === undefined ?
364 Effect.runSyncExit(provide(self, effect)) :

Callers

nothing calls this directly

Calls 2

provideFunction · 0.85
mergeRunOptionsFunction · 0.85

Tested by

no test coverage detected