Commit | Line | Data |
---|---|---|
7c0ba920 | 1 | 'use strict' |
cdace0e5 | 2 | const { ThreadWorker, KillBehaviors } = require('../../../lib') |
15d56315 | 3 | const TestUtils = require('../../test-utils') |
7c0ba920 JB |
4 | |
5 | async function error (data) { | |
6db75ad9 | 6 | return TestUtils.sleepWorkerFunction( |
15d56315 JB |
7 | data, |
8 | 2000, | |
9 | true, | |
10 | 'Error Message from ThreadWorker:async' | |
11 | ) | |
7c0ba920 JB |
12 | } |
13 | ||
14 | module.exports = new ThreadWorker(error, { | |
15 | maxInactiveTime: 500, | |
7c0ba920 JB |
16 | killBehavior: KillBehaviors.HARD |
17 | }) |