Benchmarks: properly parse env variables
[poolifier.git] / src / worker / abstract-worker.ts
index 9ec38feda57cdccc6cde6598943c2b157e439ed4..3090b6f534f29597e7dca3dabddee8935f46ddbe 100644 (file)
@@ -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)