468eee3b68db72e0d67671aeaf493d2e2b50e5ef
1 const { DynamicClusterPool
} = require('../../../lib/index')
5 const dynamicPool
= new DynamicClusterPool(
8 './benchmarks/internal/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
}