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