2 const { isMainThread
} = require('worker_threads')
3 const { ThreadWorker
} = require('poolifier')
7 function yourFunction () {
8 for (let i
= 0; i
<= 1000; i
++) {
14 debug
=== true && console
.info(`This is the main thread ${isMainThread}`)
18 module
.exports
= new ThreadWorker(yourFunction
)