chore: v3.1.9
[poolifier.git] / src / pools / thread / dynamic.ts
index 119e556dd2ccb454fec3ed9c89c20df5d76199c2..cd9d23253a040f44070da2fe0b0504da31aeb283 100644 (file)
@@ -27,12 +27,15 @@ export class DynamicThreadPool<
    */
   public constructor (
     min: number,
-    protected readonly max: number,
+    max: number,
     filePath: string,
     opts: ThreadPoolOptions = {}
   ) {
-    super(min, filePath, opts)
-    checkDynamicPoolSize(this.numberOfWorkers, this.max)
+    super(min, filePath, opts, max)
+    checkDynamicPoolSize(
+      this.minimumNumberOfWorkers,
+      this.maximumNumberOfWorkers as number
+    )
   }
 
   /** @inheritDoc */