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