Added prettier standard to support prettier and use it in combination with standard
[poolifier.git] / benchmarks / externalWorker.js
1 const { isMainThread, parentPort } = require('worker_threads')
2
3 if (!isMainThread) {
4 for (let i = 0; i <= 1000; i++) {
5 const o = {
6 a: i
7 }
8 JSON.stringify(o)
9 }
10 // console.log('This is the main thread ' + isMainThread)
11 parentPort.postMessage({ ok: 1 })
12 }