Commit | Line | Data |
---|---|---|
4c35177b | 1 | 'use strict' |
1a81f8af | 2 | const { ThreadWorker, KillBehaviors } = require('../../../lib/index') |
bdacc2d2 | 3 | const TestUtils = require('../../test-utils') |
4c35177b | 4 | |
5 | async function sleep (data) { | |
6db75ad9 | 6 | return TestUtils.sleepWorkerFunction(data, 50000) |
4c35177b | 7 | } |
8 | ||
9 | module.exports = new ThreadWorker(sleep, { | |
10 | maxInactiveTime: 500, | |
11 | async: true, | |
1a81f8af | 12 | killBehavior: KillBehaviors.HARD |
4c35177b | 13 | }) |