Add fair sharing worker choice strategy
[poolifier.git] / benchmarks / internal / thread / worker.js
index 6437c0afe6e1f6a06a9383b9855e6b3cb0fb2a8d..5196ca38c9758e24120a2ac45576cbdc49d26d12 100644 (file)
@@ -1,10 +1,13 @@
 'use strict'
+const { isMainThread } = require('worker_threads')
 const { ThreadWorker } = require('../../../lib/index')
 const { jsonIntegerSerialization } = require('../benchmark-utils')
 
+const debug = false
+
 function yourFunction (data) {
   jsonIntegerSerialization(1000)
-  // console.log('This is the main thread ' + isMainThread)
+  debug === true && console.debug('This is the main thread ' + isMainThread)
   return { ok: 1 }
 }