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
/
static-node-worker-threads-pool.mjs
diff --git
a/benchmarks/versus-external-pools/static-node-worker-threads-pool.mjs
b/benchmarks/versus-external-pools/static-node-worker-threads-pool.mjs
index b8a90ea321ccae3cf912b010ce8d4d21b30a7a53..3632216b5daeed0771077f873bbf9bca5e69f177 100644
(file)
--- a/
benchmarks/versus-external-pools/static-node-worker-threads-pool.mjs
+++ b/
benchmarks/versus-external-pools/static-node-worker-threads-pool.mjs
@@
-18,9
+18,9
@@
const pool = new StaticPool({
})
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
(pool.exec(data))
+ promises.
add
(pool.exec(data))
}
await Promise.all(promises)
// eslint-disable-next-line n/no-process-exit
}
await Promise.all(promises)
// eslint-disable-next-line n/no-process-exit