c64363de937c233972405e9473e7ddab80f5294b
2 const { isMaster
} = require('cluster')
3 const { ClusterWorker
} = require('../../../lib/index')
7 } = require('../../benchmarks-utils')
11 function yourFunction (data
) {
13 data
.function = data
.function || WorkerFunctions
.jsonIntegerSerialization
14 executeWorkerFunction(data
)
15 debug
=== true && console
.debug('This is the main thread ' + isMaster
)
19 module
.exports
= new ClusterWorker(yourFunction
)