MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / run

Method run

static/js/utils.js:240–251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

238 runWithConcurrency(task, priority = 'normal') {
239 return new Promise((resolve, reject) => {
240 const run = async () => {
241 this.activeRequestCount += 1;
242 try {
243 const result = await task();
244 resolve(result);
245 } catch (error) {
246 reject(error);
247 } finally {
248 this.activeRequestCount = Math.max(0, this.activeRequestCount - 1);
249 this.flushQueue();
250 }
251 };
252
253 if (this.activeRequestCount < this.maxConcurrentRequests) {
254 run();

Calls 1

flushQueueMethod · 0.95