X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Fdynamic-poolifier.mjs;h=ab527ee90bb4c0a946138853fa2b19793d24c5e4;hb=13a332e67a8a208b09c673d8a4a132df657ff4e6;hp=48d3028fb1a1cbd399f608b6d9e956abce3399e0;hpb=02749105fad5c3de792acbe23ed8dae1915ba2aa;p=poolifier.git diff --git a/benchmarks/versus-external-pools/dynamic-poolifier.mjs b/benchmarks/versus-external-pools/dynamic-poolifier.mjs index 48d3028f..ab527ee9 100644 --- a/benchmarks/versus-external-pools/dynamic-poolifier.mjs +++ b/benchmarks/versus-external-pools/dynamic-poolifier.mjs @@ -16,9 +16,9 @@ const dynamicPool = new DynamicThreadPool( ) async function run () { - const promises = [] + const promises = new Set() for (let i = 0; i < iterations; i++) { - promises.push(dynamicPool.execute(data)) + promises.add(dynamicPool.execute(data)) } await Promise.all(promises) // eslint-disable-next-line n/no-process-exit