Commit | Line | Data |
---|---|---|
522eea03 | 1 | # Changelog |
2 | ||
3 | All notable changes to this project will be documented in this file. | |
4 | ||
d4abc60a | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
522eea03 | 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
7 | ||
45a5a54c JB |
8 | ## [Unreleased] |
9 | ||
206a3519 JB |
10 | ## [2.6.17] - 2023-07-16 |
11 | ||
b4899fae JB |
12 | ### Added |
13 | ||
b569873d | 14 | - Add `listTaskFunctions()` method to worker class. |
b4899fae | 15 | |
58a06a6c JB |
16 | ## [2.6.16] - 2023-07-12 |
17 | ||
2a69b8c5 JB |
18 | ### Fixed |
19 | ||
80520ca4 | 20 | - Fix pool startup detection. |
2a69b8c5 JB |
21 | - Fix worker task functions handling. |
22 | ||
b5900b02 JB |
23 | ## [2.6.15] - 2023-07-11 |
24 | ||
19dbc45b JB |
25 | ### Added |
26 | ||
27 | - Take into account worker node readiness in worker choice strategies. | |
28 | ||
4a0db581 JB |
29 | ## [2.6.14] - 2023-07-10 |
30 | ||
87e44747 JB |
31 | ### Fixed |
32 | ||
33 | - Fix task function statistics tracking. | |
34 | ||
0265272f JB |
35 | ## [2.6.13] - 2023-07-10 |
36 | ||
968a2e8c JB |
37 | ### Added |
38 | ||
39 | - Add per task function statistics tracking. | |
782299f8 | 40 | - Add public methods to manipulate the worker task functions at runtime. |
968a2e8c | 41 | |
44c8c00f JB |
42 | ## [2.6.12] - 2023-07-09 |
43 | ||
aa4bf4b2 JB |
44 | ### Fixed |
45 | ||
46 | - Workaround import issue with `node:os` module in node 16.x.x. | |
47 | ||
b7cfced1 JB |
48 | ## [2.6.11] - 2023-07-09 |
49 | ||
d5024c00 JB |
50 | ### Fixed |
51 | ||
52 | - Fix pool readiness semantic. | |
53 | ||
f313a208 JB |
54 | ## [2.6.10] - 2023-07-08 |
55 | ||
2431bdb4 JB |
56 | ### Fixed |
57 | ||
58 | - Ensure workers are not recreated on error at pool startup. | |
59 | ||
60 | ### Added | |
61 | ||
62 | - Add `ready` and `strategy` fields to pool information. | |
63 | - Add pool event `ready` to notify when the number of workers created in the pool has reached the maximum size expected and are ready. | |
caadbd41 | 64 | - Add dynamic pool sizing checks. |
2431bdb4 | 65 | |
369d0a51 JB |
66 | ## [2.6.9] - 2023-07-07 |
67 | ||
2845f2a5 JB |
68 | ### Fixed |
69 | ||
70 | - Recreate the right worker type on uncaught exception. | |
71 | ||
72 | ### Added | |
73 | ||
74 | - Add minimum and maximum to internal measurement statistics. | |
1dcf8b7b | 75 | - Add `runTime` and `waitTime` to pool information. |
75d3401a | 76 | - Check worker inactive time only on dynamic worker. |
2845f2a5 | 77 | |
fc97d613 JB |
78 | ## [2.6.8] - 2023-07-03 |
79 | ||
92b1feaa JB |
80 | ### Fixed |
81 | ||
82 | - Brown paper bag release to fix version handling in pool information. | |
83 | ||
52d54060 JB |
84 | ## [2.6.7] - 2023-07-03 |
85 | ||
5bc91f3e JB |
86 | ### Fixed |
87 | ||
88 | - Ensure worker queued tasks at error are reassigned to other pool workers. | |
89 | ||
afe0d5bf JB |
90 | ### Added |
91 | ||
92 | - Add pool `utilization` ratio to pool information. | |
23ccf9d7 | 93 | - Add `version` to pool information. |
e5b3047d | 94 | - Add worker information to worker nodes. |
afe0d5bf | 95 | |
f42c583f JB |
96 | ## [2.6.6] - 2023-07-01 |
97 | ||
6961ca9a JB |
98 | ### Added |
99 | ||
100 | - Add safe helper `availableParallelism` to help sizing the pool. | |
101 | ||
3749facb JB |
102 | ### Fixed |
103 | ||
104 | - Ensure message handler is only registered in worker. | |
105 | ||
6fed2513 JB |
106 | ## [2.6.5] - 2023-06-27 |
107 | ||
c72f6987 JB |
108 | ### Known issues |
109 | ||
70726c28 | 110 | - Cluster pools tasks execution are not working by using ESM files extension: https://github.com/poolifier/poolifier/issues/782 |
c72f6987 JB |
111 | |
112 | ### Fixed | |
113 | ||
114 | - Artificial version bump to 2.6.5 to workaround publication issue. | |
115 | - Ensure cluster pool destroy() gracefully shutdowns worker's server. | |
116 | - Ensure pool event is emitted before task error promise rejection. | |
117 | - Fix queued tasks count computation. | |
118 | ||
119 | ### Removed | |
120 | ||
2fbe1783 | 121 | - Remove unneeded worker_threads worker `MessageChannel` internal usage for IPC. |
c72f6987 | 122 | |
6426631b JB |
123 | ## [2.6.4] - 2023-06-27 |
124 | ||
941f9a7c JB |
125 | ### Known issues |
126 | ||
70726c28 | 127 | - Cluster pools tasks execution are not working by using ESM files extension: https://github.com/poolifier/poolifier/issues/782 |
941f9a7c | 128 | |
2c039e43 JB |
129 | ### Fixed |
130 | ||
131 | - Ensure cluster pool destroy() gracefully shutdowns worker's server. | |
132 | - Ensure pool event is emitted before task error promise rejection. | |
9c16fb4b | 133 | - Fix queued tasks count computation. |
2c039e43 | 134 | |
941f9a7c JB |
135 | ### Removed |
136 | ||
2fbe1783 | 137 | - Remove unneeded worker_threads worker `MessageChannel` internal usage for IPC. |
941f9a7c | 138 | |
bc1b0765 JB |
139 | ## [2.6.3] - 2023-06-19 |
140 | ||
a6a2dc4c JB |
141 | ### Fixed |
142 | ||
143 | - Ensure no tasks are queued when trying to soft kill a dynamic worker. | |
f0d7f803 | 144 | - Update strategies internals after statistics computation. |
a6a2dc4c | 145 | |
7b56f532 JB |
146 | ### Changed |
147 | ||
148 | - Optimize O(1) queue implementation. | |
149 | ||
b628596c JB |
150 | ## [2.6.2] - 2023-06-12 |
151 | ||
a9e89d00 JB |
152 | ### Fixed |
153 | ||
154 | - Fix new worker use after creation in dynamic pool given the current worker choice strategy. | |
155 | ||
4368a898 JB |
156 | ## [2.6.1] - 2023-06-10 |
157 | ||
931d43e2 JB |
158 | ### Added |
159 | ||
160 | - Add worker choice strategy documentation: [README.md](./src/pools/selection-strategies/README.md). | |
161 | ||
f1c06930 JB |
162 | ### Fixed |
163 | ||
164 | - Fix average statistics computation: ensure failed tasks are not accounted. | |
165 | ||
16671b07 JB |
166 | ## [2.6.0] - 2023-06-09 |
167 | ||
a1347286 JB |
168 | ### Added |
169 | ||
5af9c0f7 | 170 | - Add `LEAST_ELU` worker choice strategy (experimental). |
9adcefab | 171 | - Add tasks ELU instead of runtime support to `FAIR_SHARE` worker choice strategy. |
a1347286 | 172 | |
1c6fe997 JB |
173 | ### Changed |
174 | ||
175 | - Refactor pool worker node usage internals. | |
477f48e7 | 176 | - Breaking change: refactor worker choice strategy statistics requirements: the syntax of the worker choice strategy options has changed. |
f63a9dda | 177 | - Breaking change: pool information `info` property object fields have been renamed. |
1c6fe997 JB |
178 | |
179 | ### Fixed | |
180 | ||
181 | - Fix wait time accounting. | |
182 | - Ensure worker choice strategy `LEAST_BUSY` accounts also tasks wait time. | |
183 | - Ensure worker choice strategy `LEAST_USED` accounts also queued tasks. | |
184 | ||
aa07d6ee JB |
185 | ## [2.5.4] - 2023-06-07 |
186 | ||
b6b32453 JB |
187 | ### Added |
188 | ||
189 | - Add Event Loop Utilization (ELU) statistics to worker tasks usage. | |
190 | ||
191 | ### Changed | |
192 | ||
193 | - Compute statistics at the worker level only if needed. | |
2fbe1783 | 194 | - Add `worker_threads` options to thread pool options. |
b6b32453 | 195 | |
272d4d8f JB |
196 | ### Fixed |
197 | ||
198 | - Make the `LEAST_BUSY` strategy only relies on task runtime. | |
199 | ||
ed47fb3d JB |
200 | ## [2.5.3] - 2023-06-04 |
201 | ||
89a4abfd JB |
202 | ### Changed |
203 | ||
204 | - Refine pool information content. | |
b4213b7f | 205 | - Limit pool internals public exposure. |
89a4abfd | 206 | |
8a9febf5 JB |
207 | ## [2.5.2] - 2023-06-02 |
208 | ||
91ee39ed JB |
209 | ### Added |
210 | ||
211 | - Add `taskError` pool event for task execution error. | |
6b27d407 | 212 | - Add pool information `info` property to pool. |
91ee39ed JB |
213 | - Emit pool information on `busy` and `full` pool events. |
214 | ||
8babb151 JB |
215 | ## [2.5.1] - 2023-06-01 |
216 | ||
0e05c4dc JB |
217 | ### Added |
218 | ||
1f68cede | 219 | - Add pool option `restartWorkerOnError` to restart worker on uncaught error. Default to `true`. |
91ee39ed | 220 | - Add `error` pool event for uncaught worker error. |
0e05c4dc | 221 | |
a8766181 JB |
222 | ## [2.5.0] - 2023-05-31 |
223 | ||
e4543b14 JB |
224 | ### Added |
225 | ||
226 | - Switch pool event emitter to `EventEmitterAsyncResource`. | |
6da80d38 | 227 | - Add tasks wait time accounting in per worker tasks usage. |
5af9c0f7 | 228 | - Add interleaved weighted round robin `INTERLEAVED_WEIGHTED_ROUND_ROBIN` worker choice strategy (experimental). |
e4543b14 JB |
229 | |
230 | ### Changed | |
231 | ||
232 | - Renamed worker choice strategy `LESS_BUSY` to `LEAST_BUSY` and `LESS_USED` to `LEAST_USED`. | |
233 | ||
570efb11 JB |
234 | ## [2.4.14] - 2023-05-09 |
235 | ||
b0f28bad JB |
236 | ### Fixed |
237 | ||
238 | - Ensure no undefined task runtime can land in the tasks history. | |
239 | - Fix median computation implementation once again. | |
240 | ||
110b6d13 JB |
241 | ### Added |
242 | ||
243 | - Unit tests for median and queue implementations. | |
244 | ||
72584880 JB |
245 | ## [2.4.13] - 2023-05-08 |
246 | ||
b0d6ed8f JB |
247 | ### Fixed |
248 | ||
e3058615 | 249 | - Fix worker choice strategy options validation. |
b0d6ed8f JB |
250 | - Fix fair share worker choice strategy internals update: ensure virtual task end timestamp is computed at task submission. |
251 | ||
06140c32 JB |
252 | ## [2.4.12] - 2023-05-06 |
253 | ||
a86b6df1 JB |
254 | ### Added |
255 | ||
256 | - Support multiple task functions per worker. | |
08f3f44c | 257 | - Add custom worker weights support to worker choice strategies options. |
a86b6df1 | 258 | |
29ee7e9a JB |
259 | ### Changed |
260 | ||
261 | - Use O(1) queue implementation for tasks queueing. | |
262 | ||
0682ba15 JB |
263 | ### Fixed |
264 | ||
265 | - Fix median computation implementation. | |
266 | - Fix fair share worker choice strategy internals update. | |
267 | ||
936d53ec JB |
268 | ## [2.4.11] - 2023-04-23 |
269 | ||
cb70b19d JB |
270 | ### Changed |
271 | ||
272 | - Optimize free worker finding in worker choice strategies. | |
273 | ||
15bb637a JB |
274 | ## [2.4.10] - 2023-04-15 |
275 | ||
ef41a6e6 JB |
276 | ### Fixed |
277 | ||
278 | - Fix typescript type definition for worker function: ensure the input data is optional. | |
279 | - Fix typescript type definition for pool execute(): ensure the input data is optional. | |
280 | ||
181eb2b4 JB |
281 | ## [2.4.9] - 2023-04-15 |
282 | ||
a20f0ba5 JB |
283 | ### Added |
284 | ||
285 | - Add tasks queue enablement runtime setter to pool. | |
286 | - Add tasks queue options runtime setter to pool. | |
287 | - Add worker choice strategy options runtime setter to pool. | |
288 | ||
289 | ### Changed | |
290 | ||
291 | - Remove the tasks queuing experimental status. | |
292 | ||
d4aeae5a JB |
293 | ### Fixed |
294 | ||
295 | - Fix worker function type definition and validation. | |
2fc5cae3 | 296 | - Fix worker choice strategy options handling. |
d4aeae5a | 297 | |
1d9e7023 JB |
298 | ## [2.4.8] - 2023-04-12 |
299 | ||
f9b4bbf8 JB |
300 | ### Fixed |
301 | ||
302 | - Fix message between main worker and worker type definition for tasks. | |
303 | - Fix code documentation. | |
304 | ||
12ae3210 JB |
305 | ## [2.4.7] - 2023-04-11 |
306 | ||
7171d33f JB |
307 | ### Added |
308 | ||
309 | - Add worker tasks queue options to pool options. | |
310 | ||
e8bd29ce JB |
311 | ### Fixed |
312 | ||
313 | - Fix missing documentation. | |
314 | ||
42c7bc10 JB |
315 | ## [2.4.6] - 2023-04-10 |
316 | ||
681196cc JB |
317 | ### Fixed |
318 | ||
319 | - Ensure one task at a time is executed per worker with tasks queueing enabled. | |
1c6fe997 | 320 | - Properly count worker executing tasks with tasks queueing enabled. |
681196cc | 321 | |
54d360e3 JB |
322 | ## [2.4.5] - 2023-04-09 |
323 | ||
3fafb1b2 JB |
324 | ### Added |
325 | ||
9e775f96 JB |
326 | - Use monotonic high resolution timer for worker tasks runtime. |
327 | - Add worker tasks median runtime to statistics. | |
ff733df7 | 328 | - Add worker tasks queue (experimental). |
3fafb1b2 | 329 | |
92fa3eb6 JB |
330 | ## [2.4.4] - 2023-04-07 |
331 | ||
aee46736 JB |
332 | ### Added |
333 | ||
334 | - Add `PoolEvents` enumeration and `PoolEvent` type. | |
335 | ||
36b5e78f JB |
336 | ### Fixed |
337 | ||
ff0c2b3e | 338 | - Destroy worker only on alive check. |
36b5e78f | 339 | |
9fb0f324 JB |
340 | ## [2.4.3] - 2023-04-07 |
341 | ||
28cf3617 JB |
342 | ### Fixed |
343 | ||
344 | - Fix typedoc generation with inheritance. | |
345 | ||
848f0f27 JB |
346 | ## [2.4.2] - 2023-04-06 |
347 | ||
164d950a JB |
348 | ### Added |
349 | ||
350 | - Add `full` event to dynamic pool. | |
32417142 | 351 | - Keep worker choice strategy in memory for conditional reuse. |
164d950a | 352 | |
78ab2555 JB |
353 | ### Fixed |
354 | ||
355 | - Fix possible negative worker key at worker removal in worker choice strategies. | |
356 | ||
79aafe9f JB |
357 | ## [2.4.1] - 2023-04-05 |
358 | ||
9cd39dd4 JB |
359 | ### Changed |
360 | ||
361 | - Optimize worker choice strategy for dynamic pool. | |
362 | ||
965415bb JB |
363 | ### Fixed |
364 | ||
365 | - Ensure dynamic pool does not alter worker choice strategy expected behavior. | |
366 | ||
d8b60b1c JB |
367 | ## [2.4.0] - 2023-04-04 |
368 | ||
c6bd2650 JB |
369 | ### Added |
370 | ||
371 | - Add `LESS_BUSY` worker choice strategy. | |
372 | ||
373 | ### Changed | |
374 | ||
375 | - Optimize worker storage in pool. | |
376 | - Optimize worker alive status check. | |
377 | - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`. | |
378 | - Optimize `LESS_USED` worker choice strategy. | |
379 | - Update benchmarks versus external threads pools. | |
380 | - Optimize tasks usage statistics requirements for worker choice strategy. | |
381 | ||
382 | ### Fixed | |
383 | ||
384 | - Ensure trimmable characters are checked at pool initialization. | |
385 | - Fix message id integer overflow. | |
386 | - Fix pool worker removal in worker choice strategy internals. | |
387 | - Fix package publication with pnpm. | |
388 | ||
d0a3f018 JB |
389 | ## [2.4.0-3] - 2023-04-04 |
390 | ||
b2ede285 JB |
391 | ### Added |
392 | ||
393 | - Add `LESS_BUSY` worker choice strategy. | |
394 | ||
395 | ### Changed | |
396 | ||
397 | - Optimize worker storage in pool. | |
398 | - Optimize worker alive status check. | |
399 | - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`. | |
400 | - Optimize `LESS_USED` worker choice strategy. | |
401 | - Update benchmarks versus external threads pools. | |
402 | ||
403 | ### Fixed | |
404 | ||
405 | - Ensure trimmable characters are checked at pool initialization. | |
406 | - Fix message id integer overflow. | |
407 | - Fix pool worker removal in worker choice strategy internals. | |
408 | - Fix package publication with pnpm. | |
409 | ||
a015ea40 JB |
410 | ## [2.4.0-2] - 2023-04-03 |
411 | ||
698f4bbc JB |
412 | ### Added |
413 | ||
414 | - Add `LESS_BUSY` worker choice strategy. | |
415 | ||
416 | ### Changed | |
417 | ||
418 | - Optimize worker storage in pool. | |
419 | - Optimize worker alive status check. | |
420 | - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`. | |
421 | - Optimize `LESS_USED` worker choice strategy. | |
422 | ||
423 | ### Fixed | |
424 | ||
425 | - Ensure trimmable characters are checked at pool initialization. | |
426 | - Fix message id integer overflow. | |
427 | - Fix pool worker removal in worker choice strategy internals. | |
428 | - Fix package publication with pnpm. | |
429 | ||
8fe15920 JB |
430 | ## [2.4.0-1] - 2023-04-03 |
431 | ||
5b301c28 JB |
432 | ### Added |
433 | ||
434 | - Add `LESS_BUSY` worker choice strategy. | |
435 | ||
436 | ### Changed | |
437 | ||
438 | - Optimize worker storage in pool. | |
439 | - Optimize worker alive status check. | |
440 | - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`. | |
441 | - Optimize `LESS_USED` worker choice strategy. | |
442 | ||
443 | ### Fixed | |
444 | ||
445 | - Ensure trimmable characters are checked at pool initialization. | |
446 | - Fix message id integer overflow. | |
447 | - Fix pool worker removal in worker choice strategy internals. | |
448 | ||
2fb9ca9c JB |
449 | ## [2.4.0-0] - 2023-04-03 |
450 | ||
168c526f JB |
451 | ### Added |
452 | ||
453 | - Add `LESS_BUSY` worker choice strategy. | |
454 | ||
1d71a908 JB |
455 | ### Changed |
456 | ||
ffcbbad8 | 457 | - Optimize worker storage in pool. |
1d71a908 | 458 | - Optimize worker alive status check. |
65a60b3b | 459 | - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`. |
737c6d97 | 460 | - Optimize `LESS_USED` worker choice strategy. |
1d71a908 | 461 | |
ffcbbad8 JB |
462 | ### Fixed |
463 | ||
464 | - Ensure trimmable characters are checked at pool initialization. | |
b4e75778 | 465 | - Fix message id integer overflow. |
97a2abc3 | 466 | - Fix pool worker removal in worker choice strategy internals. |
ffcbbad8 | 467 | |
08372738 JB |
468 | ## [2.3.10] - 2023-03-18 |
469 | ||
710826bc JB |
470 | ### Fixed |
471 | ||
472 | - Fix `exports` syntax for ESM and CommonJS. | |
473 | ||
474 | ### Changed | |
475 | ||
476 | - Permit SemVer pre-release publication. | |
76e5ac6f | 477 | |
e4796ecd JB |
478 | ## [2.3.10-2] - 2023-03-18 |
479 | ||
6abad580 JB |
480 | ### Fixed |
481 | ||
482 | - Fix `exports` syntax for ESM and CommonJS. | |
483 | ||
a2ee98cc JB |
484 | ## [2.3.10-1] - 2023-03-18 |
485 | ||
7e060cee JB |
486 | ### Changed |
487 | ||
90483887 | 488 | - Permit SemVer pre-release publication. |
7e060cee | 489 | |
c81bfafb JB |
490 | ## [2.3.10-0] - 2023-03-18 |
491 | ||
fe18768d JB |
492 | ### Fixed |
493 | ||
494 | - Fix `exports` syntax for ESM and CommonJS. | |
495 | ||
d7b78217 JB |
496 | ## [2.3.9] - 2023-03-18 |
497 | ||
ed6dd37f JB |
498 | ### Changed |
499 | ||
500 | - Introduce ESM module support along with CommonJS one. | |
501 | ||
502 | ### Fixed | |
503 | ||
504 | - Fix brown paper bag bug referencing the same object literal. | |
505 | ||
68e2ad86 JB |
506 | ## [2.3.8] - 2023-03-18 |
507 | ||
ca6c7d70 JB |
508 | ### Changed |
509 | ||
510 | - Switch internal benchmarking code to benny. | |
fbdedeb9 JB |
511 | - Switch to TypeScript 5.x.x. |
512 | - Switch rollup bundler plugins to core ones. | |
ed6dd37f | 513 | - Switch to TSDoc syntax. |
fbdedeb9 | 514 | - Enforce conventional commits. |
ca6c7d70 | 515 | |
d15211d4 JB |
516 | ### Fixed |
517 | ||
518 | - Fix random integer generator. | |
fbdedeb9 | 519 | - Fix worker choice strategy pool type identification at initialization. |
d15211d4 | 520 | |
995705ea JB |
521 | ## [2.3.7] - 2022-10-23 |
522 | ||
b953022b JB |
523 | ### Changed |
524 | ||
525 | - Switch to open collective FOSS project funding platform. | |
78cea37e JB |
526 | - Switch to ts-standard linter configuration on TypeScript code. |
527 | ||
528 | ### Fixed | |
529 | ||
530 | - Fixed missing async on pool execute method. | |
531 | - Fixed typing in TypeScript example. | |
532 | - Fixed types in unit tests. | |
b953022b | 533 | |
3b9f6953 JB |
534 | ## [2.3.6] - 2022-10-22 |
535 | ||
f80cead4 JB |
536 | ### Changed |
537 | ||
538 | - Cleanup pool attributes and methods. | |
539 | - Refine error types thrown. | |
540 | ||
541 | ### Fixed | |
542 | ||
543 | - Fix continuous integration build on windows. | |
544 | - Fix code coverage reporting by using c8 instead of nyc. | |
545 | ||
efc22107 JB |
546 | ## [2.3.5] - 2022-10-21 |
547 | ||
7a6a0a96 JB |
548 | ### Changed |
549 | ||
a05c10de JB |
550 | - Improve benchmarks: add IO intensive task workload, add task size option, integrate code into linter. |
551 | - Optimize tasks usage lookup implementation. | |
7a6a0a96 | 552 | |
b4904890 JB |
553 | ### Fixed |
554 | ||
555 | - Fix missed pool event emitter type export. | |
556 | - Fix typedoc documentation generation. | |
557 | ||
a875f8d1 JB |
558 | ## [2.3.4] - 2022-10-17 |
559 | ||
73cda448 JB |
560 | ### Added |
561 | ||
562 | - Fully automate release process with release-it. | |
563 | ||
45a5a54c JB |
564 | ### Changed |
565 | ||
73cda448 | 566 | - Optimize fair share task scheduling algorithm implementation. |
eb4a8a82 | 567 | - Update benchmarks versus external pools results with latest version. |
45a5a54c | 568 | |
90ee1b18 | 569 | ## [2.3.3] - 2022-10-15 |
1a76932b JB |
570 | |
571 | ### Added | |
572 | ||
573 | - Add support for [cluster settings](https://nodejs.org/api/cluster.html#cluster_cluster_settings) in cluster pool options. | |
574 | ||
90ee1b18 | 575 | ## [2.3.2] - 2022-10-14 |
11df3590 JB |
576 | |
577 | ### Changed | |
578 | ||
579 | - Optimize fair share worker selection strategy implementation. | |
580 | ||
581 | ### Fixed | |
582 | ||
583 | - Fix WRR worker selection strategy: ensure the condition triggering the round robin can be fulfilled. | |
584 | ||
90ee1b18 | 585 | ## [2.3.1] - 2022-10-13 |
23ff945a JB |
586 | |
587 | ### Added | |
588 | ||
589 | - Pool worker choice strategies: | |
590 | - `WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN` strategy based on weighted round robin scheduling algorithm using tasks execution time for now. | |
591 | - `WorkerChoiceStrategies.FAIR_SHARE` strategy based on fair share scheduling algorithm using tasks execution time for now. | |
592 | ||
90ee1b18 | 593 | ## [2.2.2] - 2022-10-09 |
cb2b6c69 JB |
594 | |
595 | ### Fixed | |
596 | ||
597 | - Fixed `README.md` file. | |
598 | ||
90ee1b18 | 599 | ## [2.2.1] - 2022-10-08 |
bdacc2d2 | 600 | |
bdaf31cd JB |
601 | ### Added |
602 | ||
603 | - Dynamic worker choice strategy change at runtime. | |
bdacc2d2 | 604 | |
90ee1b18 | 605 | ## [2.2.0] - 2022-01-05 |
7e0d447f JB |
606 | |
607 | ### Breaking Changes | |
608 | ||
609 | - Support only NodeJS version 16.x.x for cluster pool: upstream cluster API have changed on that version. | |
610 | ||
90ee1b18 | 611 | ## [2.1.0] - 2021-08-29 |
35cf1c03 JB |
612 | |
613 | ### Added | |
614 | ||
615 | - Add an optional pool option `messageHandler` to `PoolOptions<Worker>` for registering a message handler callback on each worker. | |
e088a00c JB |
616 | |
617 | ### Breaking Changes | |
618 | ||
619 | - `AbstractWorker` class `maxInactiveTime`, `killBehavior` and `async` attributes have been removed in favour of the same ones in the worker options `opts` public attribute. | |
620 | - `AbstractWorker` class `lastTask` attribute have been renamed to `lastTaskTimestamp`. | |
621 | - `AbstractWorker` class `interval` attribute have been renamed to `aliveInterval`. | |
c365b2d3 | 622 | - `AbstractWorker` class cannot be instantiated without specifying the `mainWorker` argument referencing the main worker. |
e088a00c | 623 | |
90ee1b18 | 624 | ## [2.0.2] - 2021-05-12 |
14916bf9 JB |
625 | |
626 | ### Bug fixes | |
627 | ||
628 | - Fix `busy` event emission on fixed pool type | |
629 | ||
90ee1b18 | 630 | ## [2.0.1] - 2021-03-16 |
7f685093 JB |
631 | |
632 | ### Bug fixes | |
633 | ||
634 | - Check if pool options are properly set. | |
635 | - `busy` event is emitted on all pool types. | |
636 | ||
90ee1b18 | 637 | ## [2.0.0] - 2021-03-01 |
fa0f5b28 | 638 | |
f3f833ab | 639 | ### Bug fixes |
d63d3be3 | 640 | |
ddbeaffd | 641 | - Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70). |
d63d3be3 | 642 | |
fa0f5b28 S |
643 | ### Breaking Changes |
644 | ||
7f685093 | 645 | - `FullPool` event is now renamed to `busy`. |
1927ee67 | 646 | - `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`. |
1a81f8af | 647 | _Find more details on our JSDoc._ |
ddbeaffd | 648 | |
1927ee67 APA |
649 | - `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed. |
650 | ||
ddbeaffd | 651 | - We changed some internal structures, but you shouldn't be too affected by them as these are internal changes. |
fa0f5b28 | 652 | |
ec2ccfc8 JB |
653 | ### Pool options types declaration merge |
654 | ||
655 | `FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`. | |
656 | ||
fa0f5b28 S |
657 | #### New `export` strategy |
658 | ||
659 | ```js | |
660 | // Before | |
777b7824 | 661 | const DynamicThreadPool = require('poolifier/lib/dynamic') |
fa0f5b28 | 662 | // After |
777b7824 | 663 | const { DynamicThreadPool } = require('poolifier/lib/dynamic') |
fa0f5b28 S |
664 | ``` |
665 | ||
666 | But you should always prefer just using | |
667 | ||
668 | ```js | |
777b7824 | 669 | const { DynamicThreadPool } = require('poolifier') |
fa0f5b28 S |
670 | ``` |
671 | ||
d3c8a1a8 S |
672 | #### New type definitions for input data and response |
673 | ||
6677a3d3 | 674 | For cluster worker and worker-thread pools, you can now only send and receive structured-cloneable data. |
d3c8a1a8 S |
675 | _This is not a limitation by poolifier but NodeJS._ |
676 | ||
3a4b605f | 677 | #### Public property replacements |
5c5a1fb7 | 678 | |
3a4b605f | 679 | `numWorkers` property is now `numberOfWorkers` |
5c5a1fb7 | 680 | |
280c2a77 | 681 | #### Internal (protected) properties and methods renaming |
fa0f5b28 | 682 | |
280c2a77 S |
683 | These properties are not intended for end users |
684 | ||
685 | - `id` => `nextMessageId` | |
686 | ||
687 | These methods are not intended for end users | |
fa0f5b28 S |
688 | |
689 | - `_chooseWorker` => `chooseWorker` | |
280c2a77 | 690 | - `_newWorker` => `createWorker` |
fa0f5b28 S |
691 | - `_execute` => `internalExecute` |
692 | - `_chooseWorker` => `chooseWorker` | |
693 | - `_checkAlive` => `checkAlive` | |
694 | - `_run` => `run` | |
695 | - `_runAsync` => `runAsync` | |
696 | ||
90ee1b18 | 697 | ## [1.1.0] - 2020-05-21 |
0312f71a APA |
698 | |
699 | ### Added | |
700 | ||
701 | - ThreadWorker support async functions as option | |
cf9aa6c3 | 702 | - Various external library patches |
0312f71a | 703 | |
90ee1b18 | 704 | ## [1.0.0] - 2020-01-24 |
522eea03 | 705 | |
706 | ### Added | |
707 | ||
708 | - FixedThreadPool implementation | |
709 | - DynamicThreadPool implementation | |
0312f71a | 710 | - WorkerThread implementation to improve developer experience |