1 import { isPrimary } from 'cluster'
2 import { ClusterWorker } from '../../lib/index.mjs'
3 import { executeTaskFunction } from '../benchmarks-utils.mjs'
4 import { TaskFunctions } from '../benchmarks-types.mjs'
8 const taskFunction = data => {
10 data.function = data.function || TaskFunctions.jsonIntegerSerialization
11 const res = executeTaskFunction(data)
12 debug === true && console.debug(`This is the main thread ${isPrimary}`)
16 export default new ClusterWorker(taskFunction)