()
| 970 | } |
| 971 | |
| 972 | get shutdown(): Effect.Effect<void> { |
| 973 | return core.uninterruptible( |
| 974 | core.withFiberRuntime<void>((state) => { |
| 975 | MutableRef.set(this.shutdownFlag, true) |
| 976 | return pipe( |
| 977 | fiberRuntime.forEachParUnbounded( |
| 978 | unsafePollAllQueue(this.pollers), |
| 979 | (d) => core.deferredInterruptWith(d, state.id()), |
| 980 | false |
| 981 | ), |
| 982 | core.zipRight(core.sync(() => { |
| 983 | this.subscribers.delete(this.subscription) |
| 984 | this.subscription.unsubscribe() |
| 985 | this.strategy.unsafeOnPubSubEmptySpace(this.pubsub, this.subscribers) |
| 986 | })), |
| 987 | core.whenEffect(core.deferredSucceed(this.shutdownHook, void 0)), |
| 988 | core.asVoid |
| 989 | ) |
| 990 | }) |
| 991 | ) |
| 992 | } |
| 993 | |
| 994 | get isShutdown(): Effect.Effect<boolean> { |
| 995 | return core.sync(() => MutableRef.get(this.shutdownFlag)) |
nothing calls this directly
no test coverage detected