Merge dependabot/npm_and_yarn/examples/typescript/smtp-client-pool/types/node-20...
[poolifier.git] / examples / javascript / multiFunctionWorker.cjs
1 'use strict'
2 const { ThreadWorker } = require('poolifier')
3
4 function fn0 (data) {
5 console.info('Executing fn0')
6 return { data: `fn0 input text was '${data.text}'` }
7 }
8
9 function fn1 (data) {
10 console.info('Executing fn1')
11 return { data: `fn1 input text was '${data.text}'` }
12 }
13
14 module.exports = new ThreadWorker({ fn0, fn1 })