repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix eslint configuration
[poolifier.git]
/
tests
/
worker-files
/
thread
/
testWorker.js
diff --git
a/tests/worker-files/thread/testWorker.js
b/tests/worker-files/thread/testWorker.js
index 3556da01f8051960125d833ec4b38e7196f6ad94..369dbdba477bc8f7f60c50976fd513e387f5ed5e 100644
(file)
--- a/
tests/worker-files/thread/testWorker.js
+++ b/
tests/worker-files/thread/testWorker.js
@@
-1,9
+1,9
@@
'use strict'
'use strict'
-const { ThreadWorker } = require('../../../lib/index')
+const { ThreadWorker
, KillBehaviors
} = require('../../../lib/index')
const { isMainThread } = require('worker_threads')
function test (data) {
const { isMainThread } = require('worker_threads')
function test (data) {
- for (let i = 0; i <
=
50; i++) {
+ for (let i = 0; i < 50; i++) {
const o = {
a: i
}
const o = {
a: i
}
@@
-12,4
+12,7
@@
function test (data) {
return isMainThread
}
return isMainThread
}
-module.exports = new ThreadWorker(test, { maxInactiveTime: 500 })
+module.exports = new ThreadWorker(test, {
+ maxInactiveTime: 500,
+ killBehavior: KillBehaviors.HARD
+})