Merge dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.7.3 into combined...
[poolifier.git] / examples / javascript / multiFunctionWorker.js
CommitLineData
106744f7 1'use strict'
60fbd6d6 2const { ThreadWorker } = require('poolifier')
106744f7 3
a86b6df1 4function fn0 (data) {
53795b86 5 console.info('Executing function 0')
1c132fec 6 return { data: `fn0 your input text was ${data.text}` }
106744f7 7}
8
a86b6df1 9function fn1 (data) {
53795b86 10 console.info('Executing function 1')
1c132fec 11 return { data: `fn1 your input text was ${data.text}` }
a86b6df1
JB
12}
13
14module.exports = new ThreadWorker({ fn0, fn1 })