1 const { DynamicClusterPool
} = require('../../lib/index')
5 const dynamicPool
= new DynamicClusterPool(
8 './benchmarks/cluster/worker.js',
14 async
function dynamicClusterTest (
15 { tasks
, workerData
} = { tasks
: 1, workerData
: { proof
: 'ok' } }
17 return new Promise((resolve
, reject
) => {
19 for (let i
= 0; i
<= tasks
; i
++) {
24 if (executions
=== tasks
) {
25 return resolve('FINISH')
29 .catch(err
=> console
.error(err
))
34 module
.exports
= { dynamicClusterTest
}