MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / waitBelow

Method waitBelow

src/extraction/store-writer.ts:157–162  ·  view source on GitHub ↗

Backpressure: resolves once fewer than `limit` bundles are un-acked.

(limit: number)

Source from the content-addressed store, hash-verified

155
156 /** Backpressure: resolves once fewer than `limit` bundles are un-acked. */
157 waitBelow(limit: number): Promise<void> {
158 if (this.firstError || this.exited || this.outstanding < limit) return Promise.resolve();
159 return new Promise<void>((resolve) => {
160 this.belowWaiters.push({ limit, resolve });
161 });
162 }
163
164 /** Resolves when every bundle posted before this call has been applied. */
165 drain(): Promise<void> {

Callers 1

storeResultMethod · 0.80

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected