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