MCPcopy
hub / github.com/codeaashu/claude-code / run

Method run

web/lib/performance/worker-pool.ts:45–56  ·  view source on GitHub ↗
(payload: unknown, transferables?: Transferable[])

Source from the content-addressed store, hash-verified

43 }
44
45 run(payload: unknown, transferables?: Transferable[]): Promise<T> {
46 return new Promise<T>((resolve, reject) => {
47 this.ensureSlots();
48 const task: WorkerTask<T> = { payload, resolve, reject, transferables };
49 const slot = this.getFreeSlot();
50 if (slot) {
51 this.dispatch(slot, task);
52 } else {
53 this.queue.push(task);
54 }
55 });
56 }
57
58 private dispatch(slot: WorkerSlot, task: WorkerTask<T>): void {
59 slot.busy = true;

Callers 4

runWithWorkloadFunction · 0.80
runWithCwdOverrideFunction · 0.80
runWithAgentContextFunction · 0.80
runWithTeammateContextFunction · 0.80

Calls 4

ensureSlotsMethod · 0.95
getFreeSlotMethod · 0.95
dispatchMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected