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

Method failAll

src/extraction/store-writer.ts:123–131  ·  view source on GitHub ↗
(err: Error)

Source from the content-addressed store, hash-verified

121 }
122
123 private failAll(err: Error): void {
124 if (!this.firstError) this.firstError = err;
125 for (const [, waiter] of this.drainWaiters) waiter.reject(this.firstError);
126 this.drainWaiters.clear();
127 this.outstanding = 0;
128 const waiters = this.belowWaiters;
129 this.belowWaiters = [];
130 for (const w of waiters) w.resolve(); // send() will surface firstError
131 }
132
133 private settleOne(): void {
134 if (this.outstanding > 0) this.outstanding--;

Callers 1

constructorMethod · 0.95

Calls 2

resolveMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected