refactor: cleanup pool busyness checks
[poolifier.git] / src / pools / thread / dynamic.ts
index d8cc3a7427ca0f843c2c9f839747b3a663b9b95c..05b61684173af58c7ed7dbbc52218c874a35fa7a 100644 (file)
@@ -42,11 +42,11 @@ export class DynamicThreadPool<
 
   /** @inheritDoc */
   public get full (): boolean {
-    return this.workers.length === this.max
+    return this.workerNodes.length === this.max
   }
 
   /** @inheritDoc */
   public get busy (): boolean {
-    return this.full && this.findFreeWorkerKey() === -1
+    return this.full && this.internalBusy()
   }
 }