Bump @typescript-eslint/eslint-plugin from 4.15.2 to 4.16.1 (#251)
[poolifier.git] / CHANGELOG.md
CommitLineData
522eea03 1# Changelog
2
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
3695a6b0 8## [2.0.0] - 2021-01-03
fa0f5b28 9
f3f833ab 10### Bug fixes
d63d3be3 11
ddbeaffd 12- Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
d63d3be3 13
fa0f5b28
S
14### Breaking Changes
15
330c983e 16- `FullPool` event is now renamed to `busy`.
1927ee67 17- `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
1a81f8af 18 _Find more details on our JSDoc._
ddbeaffd 19
1927ee67
APA
20- `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed.
21
ddbeaffd 22- We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
fa0f5b28 23
ec2ccfc8
JB
24### Pool options types declaration merge
25
26`FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
27
fa0f5b28
S
28#### New `export` strategy
29
30```js
31// Before
777b7824 32const DynamicThreadPool = require('poolifier/lib/dynamic')
fa0f5b28 33// After
777b7824 34const { DynamicThreadPool } = require('poolifier/lib/dynamic')
fa0f5b28
S
35```
36
37But you should always prefer just using
38
39```js
777b7824 40const { DynamicThreadPool } = require('poolifier')
fa0f5b28
S
41```
42
d3c8a1a8
S
43#### New type definitions for input data and response
44
ec2ccfc8 45For cluster worker and worker-thread pools, you can now only send and receive serializable data.
d3c8a1a8
S
46_This is not a limitation by poolifier but NodeJS._
47
3a4b605f 48#### Public property replacements
5c5a1fb7 49
3a4b605f 50`numWorkers` property is now `numberOfWorkers`
5c5a1fb7 51
280c2a77 52#### Internal (protected) properties and methods renaming
fa0f5b28 53
280c2a77
S
54These properties are not intended for end users
55
56- `id` => `nextMessageId`
57
58These methods are not intended for end users
fa0f5b28
S
59
60- `_chooseWorker` => `chooseWorker`
280c2a77 61- `_newWorker` => `createWorker`
fa0f5b28
S
62- `_execute` => `internalExecute`
63- `_chooseWorker` => `chooseWorker`
64- `_checkAlive` => `checkAlive`
65- `_run` => `run`
66- `_runAsync` => `runAsync`
67
0312f71a
APA
68## [1.1.0] - 2020-21-05
69
70### Added
71
72- ThreadWorker support async functions as option
cf9aa6c3 73- Various external library patches
0312f71a 74
522eea03 75## [1.0.0] - 2020-24-01
76
77### Added
78
79- FixedThreadPool implementation
80- DynamicThreadPool implementation
0312f71a 81- WorkerThread implementation to improve developer experience