Commit | Line | Data |
---|---|---|
106744f7 | 1 | 'use strict' |
60fbd6d6 | 2 | const { ThreadWorker } = require('poolifier') |
106744f7 | 3 | |
a86b6df1 | 4 | function fn0 (data) { |
c84b1e6e JB |
5 | console.info('Executing fn0') |
6 | return { data: `fn0 input text was '${data.text}'` } | |
106744f7 | 7 | } |
8 | ||
a86b6df1 | 9 | function fn1 (data) { |
c84b1e6e JB |
10 | console.info('Executing fn1') |
11 | return { data: `fn1 input text was '${data.text}'` } | |
a86b6df1 JB |
12 | } |
13 | ||
14 | module.exports = new ThreadWorker({ fn0, fn1 }) |