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