MCPcopy Create free account
hub / github.com/Cicada000/VV / enqueue

Function enqueue

Web/script.js:106–120  ·  view source on GitHub ↗
(key, requestFn)

Source from the content-addressed store, hash-verified

104 maxConcurrent: 4,
105
106 async enqueue(key, requestFn) {
107 if (this.queue.has(key)) {
108 return this.queue.get(key);
109 }
110 while (this.queue.size >= this.maxConcurrent) {
111 await new Promise((resolve) => setTimeout(resolve, 50));
112 }
113
114 const promise = requestFn().finally(() => {
115 this.queue.delete(key);
116 });
117
118 this.queue.set(key, promise);
119 return promise;
120 },
121};
122const indexCache = {
123 data: new Map(),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected