X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fabstract-worker.ts;h=3090b6f534f29597e7dca3dabddee8935f46ddbe;hb=6bd72cd09232827a710b41952254cab597664247;hp=9ec38feda57cdccc6cde6598943c2b157e439ed4;hpb=2f8c5b5c1182f698efe07d327359bef934af3a29;p=poolifier.git diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index 9ec38fed..3090b6f5 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -84,7 +84,7 @@ export abstract class AbstractWorker< ): void { if (value.data !== undefined && value.id !== undefined) { // Here you will receive messages - if (this.opts.async) { + if (this.opts.async === true) { this.runInAsyncScope(this.runAsync.bind(this), this, fn, value) } else { this.runInAsyncScope(this.run.bind(this), this, fn, value)