repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
refactor: add sanity checks to worker code
[poolifier.git]
/
examples
/
typescript
/
pool.ts
diff --git
a/examples/typescript/pool.ts
b/examples/typescript/pool.ts
index b6bb4da3427a93132842e5953cd6fa858d52408d..54b437ab31b2f1d7785439c5ce9007167e554331 100644
(file)
--- a/
examples/typescript/pool.ts
+++ b/
examples/typescript/pool.ts
@@
-20,7
+20,7
@@
export const fixedPool = new FixedThreadPool<MyData, Promise<MyResponse>>(
)
export const dynamicPool = new DynamicThreadPool<MyData, Promise<MyResponse>>(
-
availableParallelism() / 2
,
+
Math.floor(availableParallelism() / 2)
,
availableParallelism(),
join(__dirname, 'worker.js'),
{