*
* The pool filling boolean status.
*/
- protected abstract get full (): boolean
+ protected get full (): boolean {
+ return this.workerNodes.length >= this.maxSize
+ }
/**
* Whether the pool is busy or not.
return this.max
}
- /** @inheritDoc */
- protected get full (): boolean {
- return this.workerNodes.length >= this.max
- }
-
/** @inheritDoc */
protected get busy (): boolean {
return this.full && this.internalBusy()
public constructor (
numberOfWorkers: number,
filePath: string,
- public readonly opts: ClusterPoolOptions = {}
+ protected readonly opts: ClusterPoolOptions = {}
) {
super(numberOfWorkers, filePath, opts)
}
return this.numberOfWorkers
}
- /** @inheritDoc */
- protected get full (): boolean {
- return this.workerNodes.length >= this.numberOfWorkers
- }
-
/** @inheritDoc */
protected get busy (): boolean {
return this.internalBusy()
return this.max
}
- /** @inheritDoc */
- protected get full (): boolean {
- return this.workerNodes.length >= this.max
- }
-
/** @inheritDoc */
protected get busy (): boolean {
return this.full && this.internalBusy()
return this.numberOfWorkers
}
- /** @inheritDoc */
- protected get full (): boolean {
- return this.workerNodes.length >= this.numberOfWorkers
- }
-
/** @inheritDoc */
protected get busy (): boolean {
return this.internalBusy()