MCPcopy Create free account
hub / github.com/Effect-TS/effect / pullInput

Function pullInput

packages/effect/src/encoding/Zip.ts:423–424  ·  view source on GitHub ↗
(seen: number)

Source from the content-addressed store, hash-verified

421 // Serialize entry and body pulls; reuse input pulled while waiting for the lock.
422 const lock = Semaphore.makeUnsafe(1)
423 const pullInput = (seen: number) =>
424 lock.withPermit(Effect.suspend(() => pulls === seen ? pullUpstream : Effect.void))
425
426 const run = <A, D>(f: () => A | undefined | typeof NeedInput, end: () => D): Pull.Pull<A, ZipError | IE, D> =>
427 Effect.suspend(function loop(): Pull.Pull<A, ZipError | IE, D> {

Callers 1

runFunction · 0.70

Calls 1

withPermitMethod · 0.80

Tested by

no test coverage detected