chore: generate documentation
[poolifier.git] / src / pools / cluster / fixed.ts
index 092e97781911ec89ab1e16c5e2af0ca485fe1174..d644f2298000fe1b6176f335ff228e51483e9144 100644 (file)
@@ -1,7 +1,6 @@
-import type { ClusterSettings, Worker } from 'cluster'
-import cluster from 'cluster'
+import type { ClusterSettings, Worker } from 'node:cluster'
+import cluster from 'node:cluster'
 import type { MessageValue } from '../../utility-types'
-import { EMPTY_OBJECT_LITERAL } from '../../utils'
 import { AbstractPool } from '../abstract-pool'
 import type { PoolOptions } from '../pool'
 import { PoolType } from '../pool-internal'
@@ -51,7 +50,7 @@ export class FixedClusterPool<
   public constructor (
     numberOfWorkers: number,
     filePath: string,
-    public readonly opts: ClusterPoolOptions = EMPTY_OBJECT_LITERAL
+    public readonly opts: ClusterPoolOptions = {}
   ) {
     super(numberOfWorkers, filePath, opts)
   }
@@ -101,8 +100,13 @@ export class FixedClusterPool<
     return PoolType.FIXED
   }
 
+  /** {@inheritDoc} */
+  public get full (): boolean {
+    return this.workers.length === this.numberOfWorkers
+  }
+
   /** {@inheritDoc} */
   public get busy (): boolean {
-    return this.internalGetBusyStatus()
+    return this.internalBusy()
   }
 }