MCPcopy Index your code
hub / github.com/Effect-TS/effect / takeAll

Method takeAll

packages/effect/src/internal/pubsub.ts:1037–1051  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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(() => {

Callers

nothing calls this directly

Calls 5

getMethod · 0.65
isEmptyMethod · 0.65
takeAllMethod · 0.65

Tested by

no test coverage detected