Commit | Line | Data |
---|---|---|
106744f7 | 1 | 'use strict' |
1a81f8af | 2 | const { ThreadWorker, KillBehaviors } = require('../../../lib/index') |
106744f7 | 3 | const { isMainThread } = require('worker_threads') |
cf597bc5 | 4 | const TestUtils = require('../../test-utils') |
106744f7 | 5 | |
6 | function test (data) { | |
cf597bc5 | 7 | TestUtils.jsonIntegerSerialization(50) |
106744f7 | 8 | return isMainThread |
9 | } | |
10 | ||
4c35177b | 11 | module.exports = new ThreadWorker(test, { |
12 | maxInactiveTime: 500, | |
1a81f8af | 13 | killBehavior: KillBehaviors.HARD |
4c35177b | 14 | }) |