repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): bump typescript
[poolifier.git]
/
examples
/
javascript
/
dynamicExample.cjs
diff --git
a/examples/javascript/dynamicExample.cjs
b/examples/javascript/dynamicExample.cjs
index e170f59c00d35b24e54693da0a96f909f5dc73b8..ac361d08fd7e1913937ba84bd122f403da86bc0b 100644
(file)
--- a/
examples/javascript/dynamicExample.cjs
+++ b/
examples/javascript/dynamicExample.cjs
@@
-2,7
+2,7
@@
const {
DynamicThreadPool,
PoolEvents,
const {
DynamicThreadPool,
PoolEvents,
- availableParallelism
+ availableParallelism
,
} = require('poolifier')
const pool = new DynamicThreadPool(
} = require('poolifier')
const pool = new DynamicThreadPool(
@@
-10,8
+10,8
@@
const pool = new DynamicThreadPool(
availableParallelism(),
'./yourWorker.js',
{
availableParallelism(),
'./yourWorker.js',
{
+ onlineHandler: () => console.info('worker is online'),
errorHandler: e => console.error(e),
errorHandler: e => console.error(e),
- onlineHandler: () => console.info('worker is online')
}
)
let poolFull = 0
}
)
let poolFull = 0