Optimize worker handlers calls by binding them to the current instance
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 3 Jan 2023 14:20:34 +0000 (15:20 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 3 Jan 2023 14:20:34 +0000 (15:20 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
13 files changed:
.eslintrc.json
package-lock.json
package.json
src/charging-station/Bootstrap.ts
src/charging-station/ChargingStationUtils.ts
src/charging-station/ChargingStationWorker.ts
src/charging-station/ocpp/OCPPRequestService.ts
src/types/Worker.ts
src/utils/Utils.ts
src/worker/WorkerAbstract.ts
src/worker/WorkerDynamicPool.ts
src/worker/WorkerSet.ts
src/worker/WorkerStaticPool.ts

index 21d94099589070e9893a2edea0fdcc25d97cdca4..27d9f65b987d51ed54c8de4c94c58c633655ffdd 100644 (file)
@@ -9,17 +9,9 @@
     "ecmaVersion": 2020,
     "sourceType": "module"
   },
-  "extends": [
-    "eslint:recommended",
-    "plugin:import/recommended",
-    "plugin:jsdoc/recommended",
-    "plugin:prettier/recommended"
-  ],
-  "plugins": ["import", "jsdoc"],
+  "plugins": ["import"],
+  "extends": ["eslint:recommended", "plugin:import/recommended", "plugin:prettier/recommended"],
   "settings": {
-    "jsdoc": {
-      "mode": "typescript"
-    },
     "import/resolver": {
       "typescript": {
         "project": "./tsconfig.json"
       "parserOptions": {
         "project": "./tsconfig.json"
       },
+      "plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"],
       "extends": [
         "plugin:@typescript-eslint/eslint-recommended",
         "plugin:@typescript-eslint/recommended",
         "plugin:@typescript-eslint/recommended-requiring-type-checking",
         "plugin:import/typescript"
       ],
-      "plugins": ["@typescript-eslint"],
       "rules": {
+        "tsdoc/syntax": "warn",
         "@typescript-eslint/array-type": "off",
         "semi": "off",
         "@typescript-eslint/semi": ["error", "always"],
     },
     {
       "files": ["**/*.js"],
-      "extends": "plugin:n/recommended",
+      "plugins": ["jsdoc"],
+      "extends": ["plugin:jsdoc/recommended", "plugin:n/recommended"],
       "rules": {
         "n/shebang": "off"
       }
index 1e117e602c0e081db53c2dfff300d7a0cd0c425d..249a13fdf20fe29c5b1f986ec498aa878ac9407e 100644 (file)
@@ -57,6 +57,7 @@
         "eslint-plugin-jsdoc": "^39.6.4",
         "eslint-plugin-n": "^15.6.0",
         "eslint-plugin-prettier": "^4.2.1",
+        "eslint-plugin-tsdoc": "^0.2.17",
         "expect": "^29.3.1",
         "husky": "^8.0.2",
         "lint-staged": "^13.1.0",
       "integrity": "sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA==",
       "dev": true
     },
+    "node_modules/@microsoft/tsdoc": {
+      "version": "0.14.2",
+      "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz",
+      "integrity": "sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==",
+      "dev": true
+    },
+    "node_modules/@microsoft/tsdoc-config": {
+      "version": "0.16.2",
+      "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz",
+      "integrity": "sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==",
+      "dev": true,
+      "dependencies": {
+        "@microsoft/tsdoc": "0.14.2",
+        "ajv": "~6.12.6",
+        "jju": "~1.4.0",
+        "resolve": "~1.19.0"
+      }
+    },
+    "node_modules/@microsoft/tsdoc-config/node_modules/ajv": {
+      "version": "6.12.6",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+      "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+      "dev": true,
+      "dependencies": {
+        "fast-deep-equal": "^3.1.1",
+        "fast-json-stable-stringify": "^2.0.0",
+        "json-schema-traverse": "^0.4.1",
+        "uri-js": "^4.2.2"
+      },
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/epoberezkin"
+      }
+    },
+    "node_modules/@microsoft/tsdoc-config/node_modules/json-schema-traverse": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+      "dev": true
+    },
+    "node_modules/@microsoft/tsdoc-config/node_modules/resolve": {
+      "version": "1.19.0",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz",
+      "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==",
+      "dev": true,
+      "dependencies": {
+        "is-core-module": "^2.1.0",
+        "path-parse": "^1.0.6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
     "node_modules/@mikro-orm/cli": {
       "version": "5.6.3",
       "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.6.3.tgz",
         }
       }
     },
+    "node_modules/eslint-plugin-tsdoc": {
+      "version": "0.2.17",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.17.tgz",
+      "integrity": "sha512-xRmVi7Zx44lOBuYqG8vzTXuL6IdGOeF9nHX17bjJ8+VE6fsxpdGem0/SBTmAwgYMKYB1WBkqRJVQ+n8GK041pA==",
+      "dev": true,
+      "dependencies": {
+        "@microsoft/tsdoc": "0.14.2",
+        "@microsoft/tsdoc-config": "0.16.2"
+      }
+    },
     "node_modules/eslint-scope": {
       "version": "5.1.1",
       "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
         "node": ">= 10.13.0"
       }
     },
+    "node_modules/jju": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz",
+      "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==",
+      "dev": true
+    },
     "node_modules/js-sdsl": {
       "version": "4.1.4",
       "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz",
       "integrity": "sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA==",
       "dev": true
     },
+    "@microsoft/tsdoc": {
+      "version": "0.14.2",
+      "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz",
+      "integrity": "sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==",
+      "dev": true
+    },
+    "@microsoft/tsdoc-config": {
+      "version": "0.16.2",
+      "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz",
+      "integrity": "sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==",
+      "dev": true,
+      "requires": {
+        "@microsoft/tsdoc": "0.14.2",
+        "ajv": "~6.12.6",
+        "jju": "~1.4.0",
+        "resolve": "~1.19.0"
+      },
+      "dependencies": {
+        "ajv": {
+          "version": "6.12.6",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+          "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+          "dev": true,
+          "requires": {
+            "fast-deep-equal": "^3.1.1",
+            "fast-json-stable-stringify": "^2.0.0",
+            "json-schema-traverse": "^0.4.1",
+            "uri-js": "^4.2.2"
+          }
+        },
+        "json-schema-traverse": {
+          "version": "0.4.1",
+          "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+          "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+          "dev": true
+        },
+        "resolve": {
+          "version": "1.19.0",
+          "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz",
+          "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==",
+          "dev": true,
+          "requires": {
+            "is-core-module": "^2.1.0",
+            "path-parse": "^1.0.6"
+          }
+        }
+      }
+    },
     "@mikro-orm/cli": {
       "version": "5.6.3",
       "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.6.3.tgz",
         "prettier-linter-helpers": "^1.0.0"
       }
     },
+    "eslint-plugin-tsdoc": {
+      "version": "0.2.17",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.17.tgz",
+      "integrity": "sha512-xRmVi7Zx44lOBuYqG8vzTXuL6IdGOeF9nHX17bjJ8+VE6fsxpdGem0/SBTmAwgYMKYB1WBkqRJVQ+n8GK041pA==",
+      "dev": true,
+      "requires": {
+        "@microsoft/tsdoc": "0.14.2",
+        "@microsoft/tsdoc-config": "0.16.2"
+      }
+    },
     "eslint-scope": {
       "version": "5.1.1",
       "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
         "supports-color": "^7.0.0"
       }
     },
+    "jju": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz",
+      "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==",
+      "dev": true
+    },
     "js-sdsl": {
       "version": "4.1.4",
       "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz",
index 9ac30748f0e4e7c4460345a6d2e423b2a9f1bcc1..07f743a42d3952d04ea7ad7b1eca43af813272c0 100644 (file)
     "eslint-plugin-jsdoc": "^39.6.4",
     "eslint-plugin-n": "^15.6.0",
     "eslint-plugin-prettier": "^4.2.1",
+    "eslint-plugin-tsdoc": "^0.2.17",
     "expect": "^29.3.1",
     "husky": "^8.0.2",
     "lint-staged": "^13.1.0",
index 329c5546dcde0a255add2c4a136652d2b337cc61..64b35d536fa6a175875ef5bb1648e94ba4e3ae50 100644 (file)
@@ -19,6 +19,7 @@ import {
 } from '../types/ChargingStationWorker';
 import type { StationTemplateUrl } from '../types/ConfigurationData';
 import type { Statistics } from '../types/Statistics';
+import type { MessageHandler } from '../types/Worker';
 import Configuration from '../utils/Configuration';
 import logger from '../utils/Logger';
 import Utils from '../utils/Utils';
@@ -178,10 +179,7 @@ export class Bootstrap {
           poolOptions: {
             workerChoiceStrategy: Configuration.getWorker().poolStrategy,
           },
-          messageHandler: this.messageHandler.bind(this) as (
-            this: Worker,
-            msg: ChargingStationWorkerMessage<ChargingStationWorkerMessageData>
-          ) => void,
+          messageHandler: this.messageHandler.bind(this) as MessageHandler<Worker>,
         }
       ));
   }
index f7f0d4aab1af38a690be5b2bcc88e665ad483fe8..fd0dd7651f02a1e65fc5cbf00bed5e25634ce0ef 100644 (file)
@@ -284,9 +284,9 @@ export class ChargingStationUtils {
   /**
    * Charging profiles should already be sorted by connectorId and stack level (highest stack level has priority)
    *
-   * @param {ChargingProfile[]} chargingProfiles
-   * @param {string} logPrefix
-   * @returns {{ limit, matchingChargingProfile }}
+   * @param chargingProfiles -
+   * @param logPrefix -
+   * @returns
    */
   public static getLimitFromChargingProfiles(
     chargingProfiles: ChargingProfile[],
index 58f1327ab862fa7b1042ab6495834bd1543fcbc3..66f557d6913f7382791a7e864028ac2e14718588 100644 (file)
@@ -40,7 +40,7 @@ function addMessageListener(): void {
 /**
  * Create and start a charging station instance
  *
- * @param data workerData
+ * @param data workerData
  */
 function startChargingStation(data: ChargingStationWorkerData): void {
   const station = new ChargingStation(data.index, data.templateFile);
index 6c241042e8f69b7ebbe836a6a54921acb4bfb06c..da39fb9e4367f6dfa7a0ad93388c987d7a88190d 100644 (file)
@@ -233,8 +233,8 @@ export default abstract class OCPPRequestService {
           /**
            * Function that will receive the request's response
            *
-           * @param payload
-           * @param requestPayload
+           * @param payload -
+           * @param requestPayload -
            */
           function responseCallback(payload: JsonType, requestPayload: JsonType): void {
             if (chargingStation.getEnableStatistics() === true) {
@@ -265,8 +265,8 @@ export default abstract class OCPPRequestService {
           /**
            * Function that will receive the request's error response
            *
-           * @param error
-           * @param requestStatistic
+           * @param error -
+           * @param requestStatistic -
            */
           function errorCallback(error: OCPPError, requestStatistic = true): void {
             if (requestStatistic === true && chargingStation.getEnableStatistics() === true) {
index a387ceeffbefdcb8d1e88e3c5eae3ea8a6dcb923..12c2ea369552b2d5a8049adbce2bced511a996d5 100644 (file)
@@ -8,6 +8,8 @@ export enum WorkerProcessType {
   STATIC_POOL = 'staticPool',
 }
 
+export type MessageHandler<T> = (this: T, message: unknown) => void;
+
 export type WorkerOptions = {
   workerStartDelay?: number;
   elementStartDelay?: number;
@@ -15,7 +17,7 @@ export type WorkerOptions = {
   poolMinSize?: number;
   elementsPerWorker?: number;
   poolOptions?: PoolOptions<Worker>;
-  messageHandler?: (this: Worker, message: unknown) => void;
+  messageHandler?: MessageHandler<Worker>;
 };
 
 export type WorkerData = Record<string, unknown>;
index f28de9816d70771a634b7e93dcdd4ee904e000d7..94fa3d186e432712238ceee87e7f3491244cb5b7 100644 (file)
@@ -228,7 +228,7 @@ export default class Utils {
     `${str.slice(0, pos)}${subStr}${str.slice(pos)}`;
 
   /**
-   * @param [retryNumber=0]
+   * @param retryNumber - the number of retries that have already been attempted
    * @returns delay in milliseconds
    */
   public static exponentialDelay(retryNumber = 0): number {
@@ -288,7 +288,7 @@ export default class Utils {
   /**
    * Convert websocket error code to human readable string message
    *
-   * @param code websocket error code
+   * @param code websocket error code
    * @returns human readable string message
    */
   public static getWebSocketCloseEventStatusString(code: number): string {
index 27f947d1a0f04ec987b798c61948e1bed8572061..356e1a7ab8997c2dac8eeab4c03e4c09f0fac0e1 100644 (file)
@@ -12,8 +12,8 @@ export default abstract class WorkerAbstract<T extends WorkerData> {
   /**
    * `WorkerAbstract` constructor.
    *
-   * @param workerScript
-   * @param workerOptions
+   * @param workerScript -
+   * @param workerOptions -
    */
   constructor(
     workerScript: string,
index 68ba56e9a2330c3f5ae550c8abcb845ccead75f8..5e23587916cd1b5831eb800c0fbc8793dbdd1d36 100644 (file)
@@ -1,4 +1,6 @@
-import { DynamicThreadPool } from 'poolifier';
+import type { Worker } from 'worker_threads';
+
+import { DynamicThreadPool, type ErrorHandler, type ExitHandler } from 'poolifier';
 
 import type { WorkerData, WorkerOptions } from '../types/Worker';
 import Utils from '../utils/Utils';
@@ -11,15 +13,18 @@ export default class WorkerDynamicPool extends WorkerAbstract<WorkerData> {
   /**
    * Create a new `WorkerDynamicPool`.
    *
-   * @param workerScript
-   * @param workerOptions
+   * @param workerScript -
+   * @param workerOptions -
    */
   constructor(workerScript: string, workerOptions?: WorkerOptions) {
     super(workerScript, workerOptions);
-    this.workerOptions.poolOptions.errorHandler =
-      this.workerOptions?.poolOptions?.errorHandler ?? WorkerUtils.defaultErrorHandler;
-    this.workerOptions.poolOptions.exitHandler =
-      this.workerOptions?.poolOptions?.exitHandler ?? WorkerUtils.defaultExitHandler;
+    this.workerOptions.poolOptions.errorHandler = (
+      this.workerOptions?.poolOptions?.errorHandler ?? WorkerUtils.defaultErrorHandler
+    ).bind(this) as ErrorHandler<Worker>;
+    this.workerOptions.poolOptions.exitHandler = (
+      this.workerOptions?.poolOptions?.exitHandler ?? WorkerUtils.defaultExitHandler
+    ).bind(this) as ExitHandler<Worker>;
+    this.workerOptions.poolOptions.messageHandler.bind(this);
     this.pool = new DynamicThreadPool<WorkerData>(
       this.workerOptions.poolMinSize,
       this.workerOptions.poolMaxSize,
@@ -56,7 +61,7 @@ export default class WorkerDynamicPool extends WorkerAbstract<WorkerData> {
 
   /**
    *
-   * @param elementData
+   * @param elementData -
    * @returns
    * @public
    */
index f41752fc7a2b088fda4b8c68b4b74bec347b1bf9..e69e9285fbdf4b28f645e3cf34dc9baabb35d23e 100644 (file)
@@ -2,29 +2,29 @@
 
 import { Worker } from 'worker_threads';
 
-import { WorkerData, WorkerMessageEvents, WorkerOptions, WorkerSetElement } from '../types/Worker';
+import {
+  type MessageHandler,
+  type WorkerData,
+  WorkerMessageEvents,
+  type WorkerOptions,
+  type WorkerSetElement,
+} from '../types/Worker';
 import Utils from '../utils/Utils';
 import WorkerAbstract from './WorkerAbstract';
 import { WorkerUtils } from './WorkerUtils';
 
 export default class WorkerSet extends WorkerAbstract<WorkerData> {
   private readonly workerSet: Set<WorkerSetElement>;
-  private readonly messageHandler: (message: unknown) => void;
 
   /**
    * Create a new `WorkerSet`.
    *
-   * @param workerScript
-   * @param workerOptions
+   * @param workerScript -
+   * @param workerOptions -
    */
   constructor(workerScript: string, workerOptions?: WorkerOptions) {
     super(workerScript, workerOptions);
     this.workerSet = new Set<WorkerSetElement>();
-    this.messageHandler =
-      workerOptions?.messageHandler ??
-      (() => {
-        /* This is intentional */
-      });
   }
 
   get size(): number {
@@ -37,7 +37,7 @@ export default class WorkerSet extends WorkerAbstract<WorkerData> {
 
   /**
    *
-   * @param elementData
+   * @param elementData -
    * @returns
    * @public
    */
@@ -89,8 +89,16 @@ export default class WorkerSet extends WorkerAbstract<WorkerData> {
    */
   private async startWorker(): Promise<void> {
     const worker = new Worker(this.workerScript);
-    worker.on('message', this.messageHandler);
-    worker.on('error', WorkerUtils.defaultErrorHandler);
+    worker.on(
+      'message',
+      (
+        this.workerOptions?.messageHandler ??
+        (() => {
+          /* This is intentional */
+        })
+      ).bind(this) as MessageHandler<Worker>
+    );
+    worker.on('error', WorkerUtils.defaultErrorHandler.bind(this) as (err: Error) => void);
     worker.on('exit', (code) => {
       WorkerUtils.defaultExitHandler(code);
       this.workerSet.delete(this.getWorkerSetElementByWorker(worker));
index 23112a6c566ff0b95f6f07cf48b606332ab1b7fd..c3209c251ed7c35b4d4511d84e198131a0eff174 100644 (file)
@@ -1,4 +1,6 @@
-import { FixedThreadPool } from 'poolifier';
+import type { Worker } from 'worker_threads';
+
+import { type ErrorHandler, type ExitHandler, FixedThreadPool } from 'poolifier';
 
 import type { WorkerData, WorkerOptions } from '../types/Worker';
 import Utils from '../utils/Utils';
@@ -11,15 +13,18 @@ export default class WorkerStaticPool extends WorkerAbstract<WorkerData> {
   /**
    * Create a new `WorkerStaticPool`.
    *
-   * @param workerScript
-   * @param workerOptions
+   * @param workerScript -
+   * @param workerOptions -
    */
   constructor(workerScript: string, workerOptions?: WorkerOptions) {
     super(workerScript, workerOptions);
-    this.workerOptions.poolOptions.errorHandler =
-      this.workerOptions?.poolOptions?.errorHandler ?? WorkerUtils.defaultErrorHandler;
-    this.workerOptions.poolOptions.exitHandler =
-      this.workerOptions?.poolOptions?.exitHandler ?? WorkerUtils.defaultExitHandler;
+    this.workerOptions.poolOptions.errorHandler = (
+      this.workerOptions?.poolOptions?.errorHandler ?? WorkerUtils.defaultErrorHandler
+    ).bind(this) as ErrorHandler<Worker>;
+    this.workerOptions.poolOptions.exitHandler = (
+      this.workerOptions?.poolOptions?.exitHandler ?? WorkerUtils.defaultExitHandler
+    ).bind(this) as ExitHandler<Worker>;
+    this.workerOptions.poolOptions.messageHandler.bind(this);
     this.pool = new FixedThreadPool(
       this.workerOptions.poolMaxSize,
       this.workerScript,
@@ -55,7 +60,7 @@ export default class WorkerStaticPool extends WorkerAbstract<WorkerData> {
 
   /**
    *
-   * @param elementData
+   * @param elementData -
    * @returns
    * @public
    */