c3a7b0c4a9d606abee2c8b9780e0fa6df0af59e4
[poolifier.git] / yourWorker.js
1 'use strict'
2 const { ThreadWorker } = require('./lib/workers')
3
4 class MyWorker extends ThreadWorker {
5 constructor () {
6 super((data) => {
7 for (let i = 0; i <= 10000; i++) {
8 const o = {
9 a: i
10 }
11 JSON.stringify(o)
12 }
13 // console.log('This is the main thread ' + isMainThread)
14 return data
15 })
16 }
17 }
18
19 module.exports = new MyWorker()