X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Fthreadjs.js;h=ee9178e92b7954663efd9855f069476423d6bb06;hb=a3ae469eebfcc990a251133beb01378599313233;hp=5d7d64ed4925b5aa4da55214945260f17605a9ef;hpb=7a6a0a967f5d0978d7ad0714616194fe7592f69a;p=poolifier.git diff --git a/benchmarks/versus-external-pools/threadjs.js b/benchmarks/versus-external-pools/threadjs.js index 5d7d64ed..ee9178e9 100644 --- a/benchmarks/versus-external-pools/threadjs.js +++ b/benchmarks/versus-external-pools/threadjs.js @@ -1,12 +1,12 @@ // IMPORT LIBRARIES const { spawn, Worker } = require('threads') // FINISH IMPORT LIBRARIES -const size = Number(process.env.POOL_SIZE) -const iterations = Number(process.env.NUM_ITERATIONS) +const size = parseInt(process.env.POOL_SIZE) +const iterations = parseInt(process.env.NUM_ITERATIONS) const data = { test: 'MYBENCH', taskType: process.env.TASK_TYPE, - taskSize: process.env.TASK_SIZE + taskSize: parseInt(process.env.TASK_SIZE) } // Threads.js is not really a pool so we need to write few additional code @@ -28,7 +28,7 @@ async function run () { promises.push(worker.exposedFunction(data)) } await Promise.all(promises) - // eslint-disable-next-line no-process-exit + // eslint-disable-next-line n/no-process-exit process.exit() }