()
| 1035 | } |
| 1036 | |
| 1037 | get takeAll(): Effect.Effect<Chunk.Chunk<A>> { |
| 1038 | return core.suspend(() => { |
| 1039 | if (MutableRef.get(this.shutdownFlag)) { |
| 1040 | return core.interrupt |
| 1041 | } |
| 1042 | const as = MutableQueue.isEmpty(this.pollers) |
| 1043 | ? unsafePollAllSubscription(this.subscription) |
| 1044 | : Chunk.empty() |
| 1045 | this.strategy.unsafeOnPubSubEmptySpace(this.pubsub, this.subscribers) |
| 1046 | if (this.replayWindow.remaining > 0) { |
| 1047 | return core.succeed(Chunk.appendAll(this.replayWindow.takeAll(), as)) |
| 1048 | } |
| 1049 | return core.succeed(as) |
| 1050 | }) |
| 1051 | } |
| 1052 | |
| 1053 | takeUpTo(this: this, max: number): Effect.Effect<Chunk.Chunk<A>> { |
| 1054 | return core.suspend(() => { |
nothing calls this directly
no test coverage detected