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

Method takeAll

packages/effect/src/internal/queue.ts:270–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268 }
269
270 get takeAll(): Effect.Effect<Chunk.Chunk<A>> {
271 return core.suspend(() => {
272 return MutableRef.get(this.shutdownFlag)
273 ? core.interrupt
274 : core.sync(() => {
275 const values = this.queue.pollUpTo(Number.POSITIVE_INFINITY)
276 this.strategy.unsafeOnQueueEmptySpace(this.queue, this.takers)
277 return Chunk.fromIterable(values)
278 })
279 })
280 }
281
282 takeUpTo(max: number): Effect.Effect<Chunk.Chunk<A>> {
283 return core.suspend(() =>

Callers

nothing calls this directly

Calls 4

syncMethod · 0.80
getMethod · 0.65
pollUpToMethod · 0.65

Tested by

no test coverage detected