(layer: Layer.Layer<A, E, R>)
| 225 | |
| 226 | /** @internal */ |
| 227 | export 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 | })) |