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