'use strict'
-const { ThreadWorker } = require('../../../lib/index')
+const { ThreadWorker, KillBehaviors } = require('../../../lib')
-function error (data) {
- throw new Error(data)
+function error () {
+ throw new Error('Error Message from ThreadWorker')
}
-module.exports = new ThreadWorker(error, { maxInactiveTime: 500 })
+module.exports = new ThreadWorker(error, {
+ killBehavior: KillBehaviors.HARD,
+ maxInactiveTime: 500
+})