const debug = false
-function yourFunction (data) {
+function workerFunction (data) {
data = data || {}
data.function = data.function || WorkerFunctions.jsonIntegerSerialization
- executeWorkerFunction(data)
+ const res = executeWorkerFunction(data)
debug === true && console.debug('This is the main thread ' + isMaster)
- return { ok: 1 }
+ return res
}
-export default new ClusterWorker(yourFunction)
+export default new ClusterWorker(workerFunction)