X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fthread%2Ffixed.ts;h=3dc10821e2cdb9198e3eea62e287a4fc4d8aa425;hb=f82cd3579677f83c17289218d4ae8242e7d0a8d7;hp=55c35a57122433ea5c2a43d3e825f7887eb9aa3a;hpb=c4855468bc26a7ee37d2c8ef34bb1ac864448e77;p=poolifier.git diff --git a/src/pools/thread/fixed.ts b/src/pools/thread/fixed.ts index 55c35a57..3dc10821 100644 --- a/src/pools/thread/fixed.ts +++ b/src/pools/thread/fixed.ts @@ -22,7 +22,7 @@ export type ThreadWorkerWithMessageChannel = Worker & Draft * This pool selects the threads in a round robin fashion. * * @typeParam Data - Type of data sent to the worker. This can only be serializable data. - * @typeParam Response - Type of response of execution. This can only be serializable data. + * @typeParam Response - Type of execution response. This can only be serializable data. * @author [Alessandro Pio Ardizio](https://github.com/pioardi) * @since 0.0.1 */ @@ -51,7 +51,7 @@ export class FixedThreadPool< } /** @inheritDoc */ - public async destroyWorker ( + protected async destroyWorker ( worker: ThreadWorkerWithMessageChannel ): Promise { this.sendToWorker(worker, { kill: 1 }) @@ -67,7 +67,7 @@ export class FixedThreadPool< } /** @inheritDoc */ - public registerWorkerMessageListener( + protected registerWorkerMessageListener( messageChannel: ThreadWorkerWithMessageChannel, listener: (message: MessageValue) => void ): void { @@ -97,12 +97,12 @@ export class FixedThreadPool< } /** @inheritDoc */ - public get full (): boolean { + protected get full (): boolean { return this.workerNodes.length === this.numberOfWorkers } /** @inheritDoc */ - public get busy (): boolean { + protected get busy (): boolean { return this.internalBusy() } }