3 All notable changes to this project will be documented in this file.
5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8 ## [2.0.2] - 2021-12-05
12 - Fix `busy` event emission on fixed pool type
14 ## [2.0.1] - 2021-16-03
18 - Check if pool options are properly set.
19 - `busy` event is emitted on all pool types.
21 ## [2.0.0] - 2021-01-03
25 - Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
29 - `FullPool` event is now renamed to `busy`.
30 - `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
31 _Find more details on our JSDoc._
33 - `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed.
35 - We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
37 ### Pool options types declaration merge
39 `FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
41 #### New `export` strategy
45 const DynamicThreadPool = require('poolifier/lib/dynamic')
47 const { DynamicThreadPool } = require('poolifier/lib/dynamic')
50 But you should always prefer just using
53 const { DynamicThreadPool } = require('poolifier')
56 #### New type definitions for input data and response
58 For cluster worker and worker-thread pools, you can now only send and receive serializable data.
59 _This is not a limitation by poolifier but NodeJS._
61 #### Public property replacements
63 `numWorkers` property is now `numberOfWorkers`
65 #### Internal (protected) properties and methods renaming
67 These properties are not intended for end users
69 - `id` => `nextMessageId`
71 These methods are not intended for end users
73 - `_chooseWorker` => `chooseWorker`
74 - `_newWorker` => `createWorker`
75 - `_execute` => `internalExecute`
76 - `_chooseWorker` => `chooseWorker`
77 - `_checkAlive` => `checkAlive`
79 - `_runAsync` => `runAsync`
81 ## [1.1.0] - 2020-21-05
85 - ThreadWorker support async functions as option
86 - Various external library patches
88 ## [1.0.0] - 2020-24-01
92 - FixedThreadPool implementation
93 - DynamicThreadPool implementation
94 - WorkerThread implementation to improve developer experience