repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge dependabot/npm_and_yarn/examples/typescript/http-client-pool/types/node-20...
[poolifier.git]
/
examples
/
typescript
/
websocket-server-pool
/
ws-hybrid
/
src
/
main.ts
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 62e772da7bf34d4f808ef56e037f814dea16fc46..5cfbbf43e36e3f6fe0595bd9c1256cc8bcbf6f3e 100644
(file)
--- 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<ClusterWorkerData, ClusterWorkerResponse>(
pool
.execute({
port: 8080,
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: {
workerFile: requestHandlerWorkerFile,
enableTasksQueue: true,
tasksQueueOptions: {