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

Function pullInput

packages/effect/src/encoding/Tar.ts:382–383  ·  view source on GitHub ↗
(seen: number)

Source from the content-addressed store, hash-verified

380 // Serialize entry and body pulls; reuse input pulled while waiting for the lock.
381 const lock = Semaphore.makeUnsafe(1)
382 const pullInput = (seen: number) =>
383 lock.withPermit(Effect.suspend(() => pulls === seen ? pullUpstream : Effect.void))
384
385 const run = <A, D>(f: () => A | undefined | typeof NeedInput, end: () => D): Pull.Pull<A, TarError | IE, D> =>
386 Effect.suspend(function loop(): Pull.Pull<A, TarError | IE, D> {

Callers 1

runFunction · 0.70

Calls 1

withPermitMethod · 0.80

Tested by

no test coverage detected