Merge branch 'master' into issue-70
[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
11 - Now a thread/process is not delete when the task submitted take more time than maxInactiveTime configured( issue #70)
fa0f5b28
S
12### Breaking Changes
13
14We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
15
16#### New `export` strategy
17
18```js
19// Before
777b7824 20const DynamicThreadPool = require('poolifier/lib/dynamic')
fa0f5b28 21// After
777b7824 22const { DynamicThreadPool } = require('poolifier/lib/dynamic')
fa0f5b28
S
23```
24
25But you should always prefer just using
26
27```js
777b7824 28const { DynamicThreadPool } = require('poolifier')
fa0f5b28
S
29```
30
d3c8a1a8
S
31#### New type definitions for input data and response
32
33For cluster and thread pools, you can now only send and receive serializable `JSON` data.
34_This is not a limitation by poolifier but NodeJS._
35
5c5a1fb7
S
36#### Public properties renaming
37
38- Thread Pool's `numWorkers` is now `numberOfWorkers`
280c2a77 39- Thread Pool's `nextWorker` is now `nextWorkerIndex`
5c5a1fb7 40
280c2a77 41#### Internal (protected) properties and methods renaming
fa0f5b28 42
280c2a77
S
43These properties are not intended for end users
44
45- `id` => `nextMessageId`
46
47These methods are not intended for end users
fa0f5b28
S
48
49- `_chooseWorker` => `chooseWorker`
280c2a77 50- `_newWorker` => `createWorker`
fa0f5b28
S
51- `_execute` => `internalExecute`
52- `_chooseWorker` => `chooseWorker`
53- `_checkAlive` => `checkAlive`
54- `_run` => `run`
55- `_runAsync` => `runAsync`
56
0312f71a
APA
57## [1.1.0] - 2020-21-05
58
59### Added
60
61- ThreadWorker support async functions as option
cf9aa6c3 62- Various external library patches
0312f71a 63
522eea03 64## [1.0.0] - 2020-24-01
65
66### Added
67
68- FixedThreadPool implementation
69- DynamicThreadPool implementation
0312f71a 70- WorkerThread implementation to improve developer experience