MCPcopy Index your code
hub / github.com/Effect-TS/effect / launch

Function launch

packages/platform/src/internal/workerRunner.ts:227–232  ·  view source on GitHub ↗
(layer: Layer.Layer<A, E, R>)

Source from the content-addressed store, hash-verified

225
226/** @internal */
227export const launch = <A, E, R>(layer: Layer.Layer<A, E, R>): Effect.Effect<void, E | WorkerError, R> =>
228 Effect.scopedWith(Effect.fnUntraced(function*(scope) {
229 const context = yield* Layer.buildWithScope(Layer.provideMerge(layer, layerCloseLatch), scope)
230 const closeLatch = Context.get(context, CloseLatch)
231 return yield* Deferred.await(closeLatch)
232 }))

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
awaitMethod · 0.45

Tested by

no test coverage detected