poolifier
Advanced tools
Changelog
[2.0.0] - 2021-03-01
FullPool
event is now renamed to busy
.
maxInactiveTime
on ThreadWorker
default behavior is now changed, if you want to keep the old behavior set killBehavior
to KillBehaviors.HARD
.
Find more details on our JSDoc.
maxTasks
option on FixedThreadPool
and DynamicThreadPool
is now removed since is no more needed.
We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
FixedThreadPoolOptions
and DynamicThreadPoolOptions
type declarations have been merged to PoolOptions<Worker>
.
export
strategy// Before
const DynamicThreadPool = require('poolifier/lib/dynamic')
// After
const { DynamicThreadPool } = require('poolifier/lib/dynamic')
But you should always prefer just using
const { DynamicThreadPool } = require('poolifier')
For cluster worker and worker-thread pools, you can now only send and receive structured-cloneable data.
This is not a limitation by poolifier but Node.js.
numWorkers
property is now numberOfWorkers
These properties are not intended for end users
id
=> nextMessageId
These methods are not intended for end users
_chooseWorker
=> chooseWorker
_newWorker
=> createWorker
_execute
=> internalExecute
_chooseWorker
=> chooseWorker
_checkAlive
=> checkAlive
_run
=> run
_runAsync
=> runAsync
Changelog
[1.1.0] - 2020-05-21