Commit | Line | Data |
---|---|---|
27006a3d | 1 | 'use strict' |
65d7a1c9 | 2 | const { ThreadWorker } = require('poolifier') |
fd7ebd49 | 3 | |
7a6a0a96 | 4 | function yourFunction () { |
106744f7 | 5 | for (let i = 0; i <= 1000; i++) { |
6 | const o = { | |
7 | a: i | |
8 | } | |
9 | JSON.stringify(o) | |
10 | } | |
106744f7 | 11 | return { ok: 1 } |
12 | } | |
13 | ||
1f9a5a44 | 14 | module.exports = new ThreadWorker(yourFunction) |