(shell: ShellHandle<A, E>)
| 106 | ).pipe(Effect.flatten) |
| 107 | |
| 108 | const stopShell = (shell: ShellHandle<A, E>) => |
| 109 | Effect.gen(function* () { |
| 110 | if (shell.ready) yield* shell.ready.await.pipe(Effect.exit, Effect.asVoid) |
| 111 | yield* Deferred.succeed(shell.cancelled, undefined).pipe(Effect.asVoid) |
| 112 | yield* Fiber.interrupt(shell.fiber) |
| 113 | }) |
| 114 | |
| 115 | const ensureRunning = (work: Effect.Effect<A, E>) => |
| 116 | SynchronizedRef.modifyEffect( |