Merge dependabot/npm_and_yarn/examples/typescript/http-server-pool/fastify-hybrid...
[poolifier.git] / examples / javascript / yourWorker.js
CommitLineData
27006a3d 1'use strict'
65d7a1c9 2const { ThreadWorker } = require('poolifier')
fd7ebd49 3
7a6a0a96 4function 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 14module.exports = new ThreadWorker(yourFunction)