repositories
/
poolifier.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
chore: v2.4.9
[poolifier.git]
/
tests
/
worker-files
/
thread
/
longRunningWorkerSoftBehavior.js
1
'use strict'
2
const
{
ThreadWorker
} =
require
(
'../../../lib/index'
)
3
const
TestUtils
=
require
(
'../../test-utils'
)
4
5
async
function
sleep
(
data
) {
6
return
TestUtils
.
sleepWorkerFunction
(
data
,
50000
)
7
}
8
9
module
.
exports
=
new
ThreadWorker
(
sleep
, {
10
maxInactiveTime
:
500
,
11
async
:
true
12
})