fix: destroy worker only on check alive checks
[poolifier.git] / src / pools / thread / dynamic.ts
index 33e42892c424a671caf547148aa4deacaf83f5f8..d8cc3a7427ca0f843c2c9f839747b3a663b9b95c 100644 (file)
@@ -28,24 +28,24 @@ export class DynamicThreadPool<
    */
   public constructor (
     min: number,
-    private readonly max: number,
+    public readonly max: number,
     filePath: string,
     opts: PoolOptions<ThreadWorkerWithMessageChannel> = {}
   ) {
     super(min, filePath, opts)
   }
 
-  /** {@inheritDoc} */
+  /** @inheritDoc */
   public get type (): PoolType {
     return PoolType.DYNAMIC
   }
 
-  /** {@inheritDoc} */
+  /** @inheritDoc */
   public get full (): boolean {
     return this.workers.length === this.max
   }
 
-  /** {@inheritDoc} */
+  /** @inheritDoc */
   public get busy (): boolean {
     return this.full && this.findFreeWorkerKey() === -1
   }