repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: more object destructuration cleanup in examples
[poolifier.git]
/
tests
/
worker-files
/
thread
/
asyncWorker.js
diff --git
a/tests/worker-files/thread/asyncWorker.js
b/tests/worker-files/thread/asyncWorker.js
index 5af97b0734e6da16643b763a785d4069e6f48522..2b834b87fd33d9002bd664707159581824f90301 100644
(file)
--- a/
tests/worker-files/thread/asyncWorker.js
+++ b/
tests/worker-files/thread/asyncWorker.js
@@
-1,13
+1,12
@@
'use strict'
const { ThreadWorker, KillBehaviors } = require('../../../lib')
'use strict'
const { ThreadWorker, KillBehaviors } = require('../../../lib')
-const
TestUtils
= require('../../test-utils')
+const
{ sleepTaskFunction }
= require('../../test-utils')
async function sleep (data) {
async function sleep (data) {
- return
TestUtils.sleepWorker
Function(data, 2000)
+ return
sleepTask
Function(data, 2000)
}
module.exports = new ThreadWorker(sleep, {
maxInactiveTime: 500,
}
module.exports = new ThreadWorker(sleep, {
maxInactiveTime: 500,
- async: true,
killBehavior: KillBehaviors.HARD
})
killBehavior: KillBehaviors.HARD
})