()
| 253 | let isTinyWorker: boolean |
| 254 | |
| 255 | function selectWorkerImplementation(): ImplementationExport { |
| 256 | try { |
| 257 | isTinyWorker = false |
| 258 | return initWorkerThreadsWorker() |
| 259 | } catch(error) { |
| 260 | // tslint:disable-next-line no-console |
| 261 | console.debug("Node worker_threads not available. Trying to fall back to tiny-worker polyfill...") |
| 262 | isTinyWorker = true |
| 263 | return initTinyWorker() |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | export function getWorkerImplementation(): ImplementationExport { |
| 268 | if (!implementation) { |
no test coverage detected