- // we will attach a listener for every task,
- // when task is completed the listener will be removed but to avoid warnings we are increasing the max listeners size
- worker.setMaxListeners(this.opts.maxTasks ?? 1000)
+ // Listen to worker messages.
+ this.registerWorkerMessageListener(worker, super.workerListener())
+ }
+
+ /** @inheritDoc */
+ protected get type (): PoolType {
+ return PoolTypes.fixed
+ }
+
+ /** @inheritDoc */
+ protected get worker (): WorkerType {
+ return WorkerTypes.cluster
+ }
+
+ /** @inheritDoc */
+ protected get minSize (): number {
+ return this.numberOfWorkers
+ }
+
+ /** @inheritDoc */
+ protected get maxSize (): number {
+ return this.numberOfWorkers
+ }
+
+ /** @inheritDoc */
+ protected get busy (): boolean {
+ return this.internalBusy()