Update CHANGELOG.md
[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
fa0f5b28
S
8## [2.0.0] - not released yet
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
1a81f8af
S
16- `maxInactiveTime` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
17 _Find more details on our JSDoc._
ddbeaffd 18
19- We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
fa0f5b28
S
20
21#### New `export` strategy
22
23```js
24// Before
777b7824 25const DynamicThreadPool = require('poolifier/lib/dynamic')
fa0f5b28 26// After
777b7824 27const { DynamicThreadPool } = require('poolifier/lib/dynamic')
fa0f5b28
S
28```
29
30But you should always prefer just using
31
32```js
777b7824 33const { DynamicThreadPool } = require('poolifier')
fa0f5b28
S
34```
35
d3c8a1a8
S
36#### New type definitions for input data and response
37
38For cluster and thread pools, you can now only send and receive serializable `JSON` data.
39_This is not a limitation by poolifier but NodeJS._
40
920056d5 41#### Public methods removed
5c5a1fb7 42
85a3f8a7
APA
43`numWorkers` method removed
44`nextWorker` method removed
5c5a1fb7 45
280c2a77 46#### Internal (protected) properties and methods renaming
fa0f5b28 47
280c2a77
S
48These properties are not intended for end users
49
50- `id` => `nextMessageId`
51
52These methods are not intended for end users
fa0f5b28
S
53
54- `_chooseWorker` => `chooseWorker`
280c2a77 55- `_newWorker` => `createWorker`
fa0f5b28
S
56- `_execute` => `internalExecute`
57- `_chooseWorker` => `chooseWorker`
58- `_checkAlive` => `checkAlive`
59- `_run` => `run`
60- `_runAsync` => `runAsync`
61
0312f71a
APA
62## [1.1.0] - 2020-21-05
63
64### Added
65
66- ThreadWorker support async functions as option
cf9aa6c3 67- Various external library patches
0312f71a 68
522eea03 69## [1.0.0] - 2020-24-01
70
71### Added
72
73- FixedThreadPool implementation
74- DynamicThreadPool implementation
0312f71a 75- WorkerThread implementation to improve developer experience