fix: use same task timeout default as poolifier when possible
[poolifier.git] / benchmarks / versus-external-pools / fixed-tinypool.mjs
index 223c0f005837673d4f69a4d468c1938a67d929a6..9889a75667547dc4395ff274e6f574ad6d6b98d3 100644 (file)
@@ -10,14 +10,12 @@ const data = {
 }
 
 const tinypool = new Tinypool({
-  filename: './workers/tinypool/function-to-bench-worker.js',
+  filename: './workers/tinypool/function-to-bench-worker.mjs',
   minThreads: size,
+  maxThreads: size,
   idleTimeout: 60000 // this is the same as poolifier default
 })
 
-/**
- *
- */
 async function run () {
   const promises = []
   for (let i = 0; i < iterations; i++) {
@@ -28,4 +26,4 @@ async function run () {
   process.exit()
 }
 
-run()
+await run()