MCPcopy
hub / github.com/callstack/agent-device / updateWorkerRef

Function updateWorkerRef

src/utils/png-worker-client.ts:94–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92}
93
94function updateWorkerRef(): void {
95 if (!worker) return;
96 if (pendingJobs.size > 0) {
97 worker.ref();
98 } else {
99 worker.unref();
100 }
101}
102
103function obtainWorker(): Worker | null {
104 if (workerUnavailable) return null;

Callers 2

handleWorkerMessageFunction · 0.85
runWorkerJobFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected