repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
docs: update changelog, take 2
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
threadjs.js
diff --git
a/benchmarks/versus-external-pools/threadjs.js
b/benchmarks/versus-external-pools/threadjs.js
index 5d7d64ed4925b5aa4da55214945260f17605a9ef..ee9178e92b7954663efd9855f069476423d6bb06 100644
(file)
--- a/
benchmarks/versus-external-pools/threadjs.js
+++ b/
benchmarks/versus-external-pools/threadjs.js
@@
-1,12
+1,12
@@
// IMPORT LIBRARIES
const { spawn, Worker } = require('threads')
// FINISH IMPORT LIBRARIES
// IMPORT LIBRARIES
const { spawn, Worker } = require('threads')
// FINISH IMPORT LIBRARIES
-const size =
Number
(process.env.POOL_SIZE)
-const iterations =
Number
(process.env.NUM_ITERATIONS)
+const size =
parseInt
(process.env.POOL_SIZE)
+const iterations =
parseInt
(process.env.NUM_ITERATIONS)
const data = {
test: 'MYBENCH',
taskType: process.env.TASK_TYPE,
const data = {
test: 'MYBENCH',
taskType: process.env.TASK_TYPE,
- taskSize: p
rocess.env.TASK_SIZE
+ taskSize: p
arseInt(process.env.TASK_SIZE)
}
// Threads.js is not really a pool so we need to write few additional code
}
// Threads.js is not really a pool so we need to write few additional code
@@
-28,7
+28,7
@@
async function run () {
promises.push(worker.exposedFunction(data))
}
await Promise.all(promises)
promises.push(worker.exposedFunction(data))
}
await Promise.all(promises)
- // eslint-disable-next-line no-process-exit
+ // eslint-disable-next-line n
/n
o-process-exit
process.exit()
}
process.exit()
}