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