1 const { FixedThreadPool
} = require('../../lib/index')
5 const fixedPool
= new FixedThreadPool(size
, './worker.js', {
9 async
function fixedThreadTest (
10 { tasks
, workerData
} = { tasks
: 1, workerData
: { proof
: 'ok' } }
12 return new Promise((resolve
, reject
) => {
14 for (let i
= 0; i
<= tasks
; i
++) {
19 if (executions
=== tasks
) {
20 return resolve('FINISH')
31 module
.exports
= { fixedThreadTest
}