X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fwebsocket-server-pool%2Fws-hybrid%2Fsrc%2Fmain.ts;h=5cfbbf43e36e3f6fe0595bd9c1256cc8bcbf6f3e;hb=58399427588adb63380e6bfe955dbdf4ea8ea8a5;hp=62e772da7bf34d4f808ef56e037f814dea16fc46;hpb=8ebe6c308dc1fc3202980126da043b2855d24780;p=poolifier.git diff --git a/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts b/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts index 62e772da..5cfbbf43 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts +++ b/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts @@ -21,7 +21,10 @@ const pool = new FixedClusterPool( pool .execute({ port: 8080, - maxWorkers: Math.round(availableParallelism() / 2), + maxWorkers: + Math.round(availableParallelism() / 4) < 1 + ? 1 + : Math.round(availableParallelism() / 4), workerFile: requestHandlerWorkerFile, enableTasksQueue: true, tasksQueueOptions: {