MCPcopy
hub / github.com/codedogQBY/ReadAny / runSerializedDbTask

Function runSerializedDbTask

packages/core/src/db/write-retry.ts:69–76  ·  view source on GitHub ↗
(operation: () => Promise<T>)

Source from the content-addressed store, hash-verified

67}
68
69export async function runSerializedDbTask<T>(operation: () => Promise<T>): Promise<T> {
70 const queuedRun = writeQueue.then(operation, operation);
71 writeQueue = queuedRun.then(
72 () => undefined,
73 () => undefined,
74 );
75 return queuedRun;
76}

Callers 3

applyChangesFunction · 0.90
initDatabaseFunction · 0.90
initLocalDatabaseFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected