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

Function offer

packages/sql/src/SqlStream.ts:46–51  ·  view source on GitHub ↗
(chunk: Chunk.Chunk<A>)

Source from the content-addressed store, hash-verified

44 }
45
46 const offer = (chunk: Chunk.Chunk<A>) =>
47 Queue.isFull(queue).pipe(
48 Effect.tap((full) => (full ? effects.onPause : Effect.void)),
49 Effect.zipRight(Queue.offer(queue, chunk)),
50 Effect.zipRight(effects.onResume)
51 )
52
53 effects = register({
54 single: (item) => runFork(offer(Chunk.of(item))),

Callers 2

asyncPauseResumeFunction · 0.70

Calls 3

pipeMethod · 0.65
isFullMethod · 0.65
offerMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…