1 import { isMaster } from 'cluster'
2 import { ClusterWorker } from '../../lib/index.mjs'
3 import { executeWorkerFunction } from '../benchmarks-utils.js'
4 import { WorkerFunctions } from '../benchmarks-types.js'
8 function yourFunction (data) {
10 data.function = data.function || WorkerFunctions.jsonIntegerSerialization
11 executeWorkerFunction(data)
12 debug === true && console.debug('This is the main thread ' + isMaster)
16 export default new ClusterWorker(yourFunction)