(options: LocalExecutorOptions = {})
| 239 | }; |
| 240 | |
| 241 | export const createExecutorHandle = async (options: LocalExecutorOptions = {}) => { |
| 242 | const layer = createLocalExecutorLayer(options); |
| 243 | const runtime = ManagedRuntime.make(layer); |
| 244 | const bundle = await runtime.runPromise(LocalExecutorTag.asEffect()); |
| 245 | |
| 246 | return { |
| 247 | executor: bundle.executor, |
| 248 | plugins: bundle.plugins, |
| 249 | dispose: async () => { |
| 250 | await Effect.runPromise(Effect.ignore(bundle.executor.close())); |
| 251 | await ignorePromiseFailure("disposeRuntime", () => runtime.dispose()); |
| 252 | }, |
| 253 | }; |
| 254 | }; |
| 255 | |
| 256 | class SharedHandleCreateError extends Data.TaggedError("SharedHandleCreateError")<{ |
| 257 | readonly cause: unknown; |
no test coverage detected