MCPcopy Create free account
hub / github.com/effect-app/libs / runCallback

Function runCallback

repos/effect/packages/effect/src/ManagedRuntime.ts:337–346  ·  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

335 },
336 dispose(): Promise<void> {
337 return Effect.runPromise(self.disposeEffect)
338 },
339 [Symbol.asyncDispose](): Promise<void> {
340 return self.dispose()
341 },
342 disposeEffect: Effect.suspend(() => {
343 ;(self as Mutable<ManagedRuntime<R, ER>>).contextEffect = Effect.die("ManagedRuntime disposed")
344 self.cachedContext = undefined
345 return Scope.close(self.scope, Exit.void)
346 }),
347 runFork<A, E>(effect: Effect.Effect<A, E, R>, options?: Effect.RunOptions): Fiber.Fiber<A, E | ER> {
348 return self.cachedContext === undefined ?
349 Effect.runFork(provide(self, effect), mergeRunOptions(options)) :

Callers

nothing calls this directly

Calls 2

provideFunction · 0.85
mergeRunOptionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…