d5d9b3101ba862f06b12882b2a896aa3ec32c1f3
[poolifier.git] / tests / worker-files / thread / asyncWorker.js
1 'use strict'
2 const { ThreadWorker, KillBehaviors } = require('../../../lib')
3 const TestUtils = require('../../test-utils')
4
5 async function sleep (data) {
6 return TestUtils.sleepWorkerFunction(data, 2000)
7 }
8
9 module.exports = new ThreadWorker(sleep, {
10 maxInactiveTime: 500,
11 killBehavior: KillBehaviors.HARD
12 })