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

Method flushOrdered

src/extraction/index.ts:1799–1815  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1797 let flushChain: Promise<void> = Promise.resolve();
1798 let flushError: unknown = null;
1799 const flushOrdered = (): Promise<void> => {
1800 flushChain = flushChain.then(async () => {
1801 if (aborted || flushError) return;
1802 try {
1803 while (completed.has(nextToStore)) {
1804 const item = completed.get(nextToStore)!;
1805 completed.delete(nextToStore);
1806 nextToStore++;
1807 if (item.ok) await storeResult(item.filePath, item.content, item.stats, item.result);
1808 else recordParseFailure(item.filePath, item.err);
1809 }
1810 } catch (err) {
1811 flushError = err;
1812 }
1813 });
1814 return flushChain;
1815 };
1816
1817 // Dispatch one file's parse (parses run concurrently across the pool), tagged
1818 // with its file-order sequence so flushOrdered commits results in order. The

Callers

nothing calls this directly

Calls 2

hasMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected