7e607c87059229431490d29e1cee0b56b5e2d51c
1 const { DynamicClusterPool
} = require('../../../lib/index')
5 const dynamicPool
= new DynamicClusterPool(
8 './benchmarks/internal/cluster/worker.js'
11 async
function dynamicClusterTest (
12 { tasks
, workerData
} = { tasks
: 1, workerData
: { proof
: 'ok' } }
14 return new Promise((resolve
, reject
) => {
16 for (let i
= 0; i
<= tasks
; i
++) {
21 if (executions
=== tasks
) {
22 return resolve('FINISH')
26 .catch(err
=> console
.error(err
))
31 module
.exports
= { dynamicClusterTest
}