Fix Wrk default options.
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 29 Jan 2021 07:42:50 +0000 (08:42 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 29 Jan 2021 07:42:50 +0000 (08:42 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/WorkerFactory.ts

index fcfe4f80677820266f8438aab242907d281de1ff..1bc6786d0cc991993e7809f52022a4a5a212dedd 100644 (file)
@@ -23,15 +23,15 @@ export default class WorkerFactory {
         return new WorkerSet<T>(workerScript, options.elementsPerWorker);
       case WorkerProcessType.STATIC_POOL:
         if (Utils.isUndefined(options.poolMaxSize)) {
-          options.elementsPerWorker = 16;
+          options.poolMaxSize = 16;
         }
         return new WorkerStaticPool<T>(workerScript, options.poolMaxSize);
       case WorkerProcessType.DYNAMIC_POOL:
         if (Utils.isUndefined(options.poolMinSize)) {
-          options.elementsPerWorker = 4;
+          options.poolMinSize = 4;
         }
         if (Utils.isUndefined(options.poolMaxSize)) {
-          options.elementsPerWorker = 16;
+          options.poolMaxSize = 16;
         }
         return new WorkerDynamicPool<T>(workerScript, options.poolMinSize, options.poolMaxSize);
       default: