MCPcopy
hub / github.com/CapSoftware/Cap / enqueue

Method enqueue

packages/recorder-core/src/recording-spool.ts:383–400  ·  view source on GitHub ↗
(task: () => Promise<void>)

Source from the content-addressed store, hash-verified

381 }
382
383 private enqueue(task: () => Promise<void>) {
384 const operation = this.pendingWrite.then(async () => {
385 if (this.writeError) {
386 throw this.writeError;
387 }
388
389 await task();
390 });
391 this.pendingWrite = operation.then(
392 () => undefined,
393 () => undefined,
394 );
395
396 return operation.catch((error) => {
397 this.writeError = normalizeError(error);
398 throw this.writeError;
399 });
400 }
401}
402
403export const canUseRecordingSpool = () =>

Callers 6

appendChunkMethod · 0.95
startFunction · 0.80
sendUpdateFunction · 0.80
pullFunction · 0.80
startFunction · 0.80
startFunction · 0.80

Calls 1

normalizeErrorFunction · 0.85

Tested by 1

startFunction · 0.64