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

Function runtime

repos/effect/packages/effect/src/FiberHandle.ts:657–683  ·  view source on GitHub ↗
(self: FiberHandle<A, E>)

Source from the content-addressed store, hash-verified

655 * yield* Fiber.await(fiberA)
656 * return (yield* Fiber.join(fiberB)).length
657 * }).pipe(
658 * Effect.scoped // The fiber will be interrupted when the scope is closed
659 * )
660 *
661 * const actual = await Effect.runPromise(Effect.provideService(program, Users, {
662 * getAll: Effect.succeed([])
663 * }))
664 * actual // => 0
665 * ```
666 *
667 * @category combinators
668 * @since 2.0.0
669 */
670export const runtime: <A, E>(
671 self: FiberHandle<A, E>
672) => <R = never>() => Effect.Effect<
673 <XE extends E, XA extends A>(
674 effect: Effect.Effect<XA, XE, R>,
675 options?:
676 | {
677 readonly signal?: AbortSignal | undefined
678 readonly scheduler?: Scheduler | undefined
679 readonly onlyIfMissing?: boolean | undefined
680 readonly propagateInterruption?: boolean | undefined
681 }
682 | undefined
683 ) => Fiber.Fiber<XA, XE>,
684 never,
685 R
686> = <A, E>(self: FiberHandle<A, E>) => <R>() =>

Callers 2

makeRuntimeFunction · 0.70
runtimePromiseFunction · 0.70

Calls 4

runForkFunction · 0.85
setUnsafeFunction · 0.85
mapMethod · 0.65
contextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…