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