refactor: make TS example compatible with latest ES version
[poolifier.git] / benchmarks / internal / cluster-worker.mjs
index e8d16d217313457bffccb269642644207d1292f0..2ec78054e655f25f181e888c0f90b6bd28ba4b66 100644 (file)
@@ -8,9 +8,9 @@ const debug = false
 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(workerFunction)