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

Function make

repos/effect/packages/effect/src/FiberHandle.ts:138–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136 * Effect.scoped // The fiber will be interrupted when the scope is closed
137 * )
138 *
139 * const actual = await Effect.runPromise(program)
140 * actual // => true
141 * ```
142 *
143 * @category constructors
144 * @since 2.0.0
145 */
146export const make = <A = unknown, E = unknown>(): Effect.Effect<FiberHandle<A, E>, never, Scope.Scope> =>
147 Effect.acquireRelease(
148 Effect.sync(() => makeUnsafe<A, E>()),
149 (handle) => {
150 const state = handle.state
151 if (state._tag === "Closed") return Effect.void
152 handle.state = { _tag: "Closed" }
153 return state.fiber ?
154 Deferred.into(
155 Effect.asVoid(Fiber.interruptAs(state.fiber, internalFiberId)),

Callers 2

makeRuntimeFunction · 0.70
makeRuntimePromiseFunction · 0.70

Calls 3

syncMethod · 0.80
doneMethod · 0.80
makeUnsafeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…