refactor: cleanup cluster ESM issue workaround
[poolifier.git] / examples / yourWorker.js
index 5bd1ad6569c212b560d3eb829352f8974417b4a3..b2df8d19093527e0ca67a24f9f84589ab1207050 100644 (file)
@@ -1,6 +1,6 @@
 'use strict'
-const { ThreadWorker } = require('poolifier')
 const { isMainThread } = require('worker_threads')
+const { ThreadWorker } = require('poolifier')
 
 const debug = false
 
@@ -11,7 +11,7 @@ function yourFunction () {
     }
     JSON.stringify(o)
   }
-  debug === true && console.log('This is the main thread ' + isMainThread)
+  debug === true && console.info('This is the main thread ' + isMainThread)
   return { ok: 1 }
 }