repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): apply updates
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
dynamic-workerpool.mjs
diff --git
a/benchmarks/versus-external-pools/dynamic-workerpool.mjs
b/benchmarks/versus-external-pools/dynamic-workerpool.mjs
index 9dc0e70275ca98f89da39b498bebfb4bce70b273..2fb02d4b5e7c2b37b3beb592f8a5adf550bd42e9 100644
(file)
--- a/
benchmarks/versus-external-pools/dynamic-workerpool.mjs
+++ b/
benchmarks/versus-external-pools/dynamic-workerpool.mjs
@@
-19,9
+19,9
@@
const workerPool = workerpool.pool(
)
async function run () {
)
async function run () {
- const promises =
[]
+ const promises =
new Set()
for (let i = 0; i < iterations; i++) {
for (let i = 0; i < iterations; i++) {
- promises.
push
(workerPool.exec('functionToBench', dataArray))
+ promises.
add
(workerPool.exec('functionToBench', dataArray))
}
await Promise.all(promises)
// eslint-disable-next-line n/no-process-exit
}
await Promise.all(promises)
// eslint-disable-next-line n/no-process-exit