Commit | Line | Data |
---|---|---|
d35e5717 JB |
1 | import { KillBehaviors, ThreadWorker } from '../../../lib/index.cjs' |
2 | import { sleepTaskFunction } from '../../test-utils.cjs' | |
b2fd3f4a JB |
3 | |
4 | /** | |
5 | * | |
6 | * @param data | |
2eb14889 | 7 | * @returns |
b2fd3f4a JB |
8 | */ |
9 | async function sleep (data) { | |
10 | return sleepTaskFunction(data, 50000) | |
11 | } | |
12 | ||
13 | export default new ThreadWorker(sleep, { | |
14 | killBehavior: KillBehaviors.HARD, | |
15 | maxInactiveTime: 500 | |
16 | }) |