Error handling and unit tests
[poolifier.git] / tests / workers / echoWorker.js
1 'use strict'
2 const { ThreadWorker } = require('../../lib/workers')
3
4 function echo (data) {
5 return data
6 }
7
8 class MyWorker extends ThreadWorker {
9 constructor () {
10 super(echo, { maxInactiveTime: 500 })
11 }
12 }
13
14 module.exports = new MyWorker()