Report some code cleanups from work in progress PR
[poolifier.git] / tests / worker-files / thread / asyncWorker.js
CommitLineData
7784f548 1'use strict'
1a81f8af 2const { ThreadWorker, KillBehaviors } = require('../../../lib/index')
bdacc2d2 3const TestUtils = require('../../test-utils')
7784f548 4
5async function sleep (data) {
bdacc2d2 6 return TestUtils.workerSleepFunction(data, 2000)
7784f548 7}
8
4c35177b 9module.exports = new ThreadWorker(sleep, {
10 maxInactiveTime: 500,
11 async: true,
1a81f8af 12 killBehavior: KillBehaviors.HARD
4c35177b 13})