Merge branch 'master' into elu-strategy
[poolifier.git] / src / pools / thread / dynamic.ts
index 79c43b7d5a1b15bdc9b63f7ebd781906c67b5deb..90889c9b2572728ba7145da8e3a5c04bfa3c3378 100644 (file)
@@ -26,7 +26,7 @@ export class DynamicThreadPool<
    */
   public constructor (
     min: number,
-    public readonly max: number,
+    protected readonly max: number,
     filePath: string,
     opts: PoolOptions<ThreadWorkerWithMessageChannel> = {}
   ) {
@@ -34,7 +34,7 @@ export class DynamicThreadPool<
   }
 
   /** @inheritDoc */
-  public get type (): PoolType {
+  protected get type (): PoolType {
     return PoolTypes.dynamic
   }
 
@@ -43,11 +43,6 @@ export class DynamicThreadPool<
     return this.max
   }
 
-  /** @inheritDoc */
-  protected get full (): boolean {
-    return this.workerNodes.length >= this.max
-  }
-
   /** @inheritDoc */
   protected get busy (): boolean {
     return this.full && this.internalBusy()