Commit | Line | Data |
---|---|---|
1 | 'use strict' | |
2 | const { ThreadWorker, KillBehaviors } = require('../../../lib/index') | |
3 | ||
4 | function error (data) { | |
5 | throw new Error('Error Message from ThreadWorker') | |
6 | } | |
7 | ||
8 | module.exports = new ThreadWorker(error, { | |
9 | maxInactiveTime: 500, | |
10 | async: false, | |
11 | killBehavior: KillBehaviors.HARD | |
12 | }) |