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