Improve worker selection strategies coverage. (#220)
[poolifier.git] / CHANGELOG.md
... / ...
CommitLineData
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
8## [2.0.0] - not released yet
9
10### Bug fixes
11
12- Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
13
14### Breaking Changes
15
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._
18
19- We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
20
21### Pool options types declaration merge
22
23`FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
24
25#### New `export` strategy
26
27```js
28// Before
29const DynamicThreadPool = require('poolifier/lib/dynamic')
30// After
31const { DynamicThreadPool } = require('poolifier/lib/dynamic')
32```
33
34But you should always prefer just using
35
36```js
37const { DynamicThreadPool } = require('poolifier')
38```
39
40#### New type definitions for input data and response
41
42For cluster worker and worker-thread pools, you can now only send and receive serializable data.
43_This is not a limitation by poolifier but NodeJS._
44
45#### Public property replacements
46
47`numWorkers` property is now `numberOfWorkers`
48`nextWorker` property is now `nextWorkerIndex`
49
50#### Internal (protected) properties and methods renaming
51
52These properties are not intended for end users
53
54- `id` => `nextMessageId`
55
56These methods are not intended for end users
57
58- `_chooseWorker` => `chooseWorker`
59- `_newWorker` => `createWorker`
60- `_execute` => `internalExecute`
61- `_chooseWorker` => `chooseWorker`
62- `_checkAlive` => `checkAlive`
63- `_run` => `run`
64- `_runAsync` => `runAsync`
65
66## [1.1.0] - 2020-21-05
67
68### Added
69
70- ThreadWorker support async functions as option
71- Various external library patches
72
73## [1.0.0] - 2020-24-01
74
75### Added
76
77- FixedThreadPool implementation
78- DynamicThreadPool implementation
79- WorkerThread implementation to improve developer experience