fed363d88a19a2a88ef7d32f8190dc57b3313ff2
[poolifier.git] / CHANGELOG.md
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.1.0/),
6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
8 ## [Unreleased]
9
10 ### Changed
11
12 - Optimize worker choice strategies implementation.
13
14 ## [2.6.40] - 2023-09-01
15
16 ### Fixed
17
18 - Do not pre-choose in WRR worker choice strategy to avoid bias.
19 - Avoid array out of bound in worker choice strategies after worker node removal.
20
21 ## [2.6.39] - 2023-08-30
22
23 ### Fixed
24
25 - Fix race condition in worker choice strategies at worker node info querying while not yet initialized .
26
27 ## [2.6.38] - 2023-08-30
28
29 ### Added
30
31 - Bundle typescript types declaration into one file.
32
33 ### Changed
34
35 - Improve interleaved weighted round robin worker choice strategy implementation.
36
37 ## [2.6.37] - 2023-08-28
38
39 ### Fixed
40
41 - Ensure unused worker usage statistics are deleted at runtime.
42
43 ### Changed
44
45 - Rename worker choice strategy options `choiceRetries` to `retries`.
46 - Avoid unnecessary branching in worker choice strategies.
47
48 ## [2.6.36] - 2023-08-27
49
50 ### Fixed
51
52 - Fix pool `execute()` arguments check.
53
54 ### Changed
55
56 - Make continuous tasks stealing algorithm less aggressive.
57 - Fine tune tasks stealing algorithm under back pressure.
58
59 ## [2.6.35] - 2023-08-25
60
61 ### Fixed
62
63 - Don't account worker usage statistics for tasks that have failed.
64 - Fix pool information runtime and wait time median computation.
65
66 ### Changed
67
68 - Update simple moving average implementation to use a circular buffer.
69 - Update simple moving median implementation to use a circular buffer.
70 - Account for stolen tasks in worker usage statistics and pool information.
71
72 ### Added
73
74 - Continuous tasks stealing algorithm.
75
76 ## [2.6.34] - 2023-08-24
77
78 ### Fixes
79
80 - Avoid cascading tasks stealing under back pressure.
81
82 ### Changed
83
84 - Add fastpath to queued tasks rescheduling.
85
86 ## [2.6.33] - 2023-08-24
87
88 ### Fixed
89
90 - Fix queued tasks rescheduling.
91
92 ### Changed
93
94 - Rename tasks queue options `queueMaxSize` to `size`.
95
96 ### Added
97
98 - Task stealing scheduling algorithm if tasks queueing is enabled.
99
100 ## [2.6.32] - 2023-08-23
101
102 ### Fixed
103
104 - Ensure no task can be executed when the pool is destroyed.
105
106 ### Added
107
108 - Add `queueMaxSize` option to tasks queue options.
109 - Add O(1) deque implementation implemented with doubly linked list and use it for tasks queueing.
110 - Add tasks stealing algorithm when a worker node queue is back pressured if tasks queueing is enabled.
111
112 ## [2.6.31] - 2023-08-20
113
114 ### Fixed
115
116 - Fix worker choice strategy retries mechanism in some edge cases.
117
118 ### Changed
119
120 - Make orthogonal worker choice strategies tasks distribution and created dynamic worker usage.
121 - Remove the experimental status of the `LEAST_ELU` worker choice strategy.
122
123 ## [2.6.30] - 2023-08-19
124
125 ### Fixed
126
127 - Ensure pool event `backPressure` is emitted.
128 - Ensure pool event `full` is emitted only once.
129 - Ensure worker node cannot be instantiated without proper arguments.
130
131 ## [2.6.29] - 2023-08-18
132
133 ### Fixed
134
135 - Fix race condition between ready and task functions worker message handling at startup.
136 - Fix duplicate task function worker usage statistics computation per task function.
137 - Update task function worker usage statistics if and only if there's at least two different task functions.
138 - Fix race condition at task function worker usage executing task computation leading to negative value.
139
140 ### Added
141
142 - Add back pressure detection on the worker node queue. Event `backPressure` is emitted when all worker node queues are full (worker node queue size >= poolMaxSize^2).
143 - Use back pressure detection in worker choice strategies.
144 - Add worker choice strategies retries mechanism if no worker is eligible.
145
146 ## [2.6.28] - 2023-08-16
147
148 ### Fixed
149
150 - Ensure pool workers are properly initialized.
151
152 ### Added
153
154 - HTTP server pool examples: express-cluster, express-hybrid.
155
156 ### Changed
157
158 - Remove now useless branching in worker hot code path.
159
160 ## [2.6.27] - 2023-08-15
161
162 ### Fixed
163
164 - Add `KillHandler` type definition to exported types.
165
166 ### Added
167
168 - Add `destroy` event to pool API.
169
170 ## [2.6.26] - 2023-08-15
171
172 ### Added
173
174 - Add kill handler to worker options allowing to execute custom code when worker is killed.
175 - Add `listTaskFunctions()` method to pool API.
176 - SMTP server pool example: nodemailer.
177
178 ## [2.6.25] - 2023-08-13
179
180 ### Added
181
182 - HTTP server pool examples: fastify-cluster, fastify-hybrid.
183 - WebSocket server pool examples: ws-cluster, ws-hybrid.
184
185 ## [2.6.24] - 2023-08-12
186
187 ### Added
188
189 - Add array of transferable objects to the `execute()` method arguments.
190 - WebSocket server pool examples: ws-worker_threads.
191
192 ## [2.6.23] - 2023-08-11
193
194 ### Fixed
195
196 - Fix pool busyness semantic when tasks queueing is enabled: the pool is busy when the number of executing tasks on each worker has reached the maximum tasks concurrency per worker.
197
198 ### Added
199
200 - HTTP client pool examples: fetch, node-fetch and axios with multiple task functions.
201 - HTTP server pool examples: express-worker_threads, fastify-worker_threads.
202
203 ## [2.6.22] - 2023-08-10
204
205 ### Fixed
206
207 - Add missing `types` field to package.json `exports`.
208
209 ### Changed
210
211 - Structure markdown documentation (PR #811).
212
213 ## [2.6.21] - 2023-08-03
214
215 ### Changed
216
217 - Improve code documentation.
218 - Code refactoring and cleanup for better maintainability and readability.
219
220 ## [2.6.20] - 2023-07-21
221
222 ### Fixed
223
224 - Fix queued tasks redistribution on error task execution starvation.
225 - Ensure tasks queueing per worker condition is untangled from the pool busyness semantic.
226
227 ### Changed
228
229 - Drastically reduce lookups by worker in the worker nodes.
230
231 ## [2.6.19] - 2023-07-20
232
233 ### Added
234
235 - Dedicated internal communication channel for worker_threads pools.
236
237 ## [2.6.18] - 2023-07-19
238
239 ### Changed
240
241 - Code refactoring and cleanup for better maintainability and readability. Bundle size is a bit smaller.
242
243 ## [2.6.17] - 2023-07-16
244
245 ### Added
246
247 - Add `listTaskFunctions()` method to worker API.
248
249 ## [2.6.16] - 2023-07-12
250
251 ### Fixed
252
253 - Fix pool startup detection.
254 - Fix worker task functions handling.
255
256 ## [2.6.15] - 2023-07-11
257
258 ### Added
259
260 - Take into account worker node readiness in worker choice strategies.
261
262 ## [2.6.14] - 2023-07-10
263
264 ### Fixed
265
266 - Fix task function statistics tracking.
267
268 ## [2.6.13] - 2023-07-10
269
270 ### Added
271
272 - Add per task function statistics tracking.
273 - Add public methods to manipulate the worker task functions at runtime.
274
275 ## [2.6.12] - 2023-07-09
276
277 ### Fixed
278
279 - Workaround import issue with `node:os` module in node 16.x.x.
280
281 ## [2.6.11] - 2023-07-09
282
283 ### Fixed
284
285 - Fix pool readiness semantic.
286
287 ## [2.6.10] - 2023-07-08
288
289 ### Fixed
290
291 - Ensure workers are not recreated on error at pool startup.
292
293 ### Added
294
295 - Add `ready` and `strategy` fields to pool information.
296 - Add pool event `ready` to notify when the number of workers created in the pool has reached the maximum size expected and are ready.
297 - Add dynamic pool sizing checks.
298
299 ## [2.6.9] - 2023-07-07
300
301 ### Fixed
302
303 - Recreate the right worker type on uncaught exception.
304
305 ### Added
306
307 - Add minimum and maximum to internal measurement statistics.
308 - Add `runTime` and `waitTime` to pool information.
309 - Check worker inactive time only on dynamic worker.
310
311 ## [2.6.8] - 2023-07-03
312
313 ### Fixed
314
315 - Brown paper bag release to fix version handling in pool information.
316
317 ## [2.6.7] - 2023-07-03
318
319 ### Fixed
320
321 - Ensure worker queued tasks at error are reassigned to other pool workers.
322
323 ### Added
324
325 - Add pool `utilization` ratio to pool information.
326 - Add `version` to pool information.
327 - Add worker information to worker nodes.
328
329 ## [2.6.6] - 2023-07-01
330
331 ### Added
332
333 - Add safe helper `availableParallelism()` to help sizing the pool.
334
335 ### Fixed
336
337 - Ensure message handler is only registered in worker.
338
339 ## [2.6.5] - 2023-06-27
340
341 ### Known issues
342
343 - Cluster pools tasks execution are not working by using ESM files extension: https://github.com/poolifier/poolifier/issues/782
344
345 ### Fixed
346
347 - Artificial version bump to 2.6.5 to workaround publication issue.
348 - Ensure cluster pool `destroy()` gracefully shutdowns worker's server.
349 - Ensure pool event is emitted before task error promise rejection.
350 - Fix queued tasks count computation.
351
352 ### Removed
353
354 - Remove unneeded worker_threads worker `MessageChannel` internal usage for IPC.
355
356 ## [2.6.4] - 2023-06-27
357
358 ### Known issues
359
360 - Cluster pools tasks execution are not working by using ESM files extension: https://github.com/poolifier/poolifier/issues/782
361
362 ### Fixed
363
364 - Ensure cluster pool `destroy()` gracefully shutdowns worker's server.
365 - Ensure pool event is emitted before task error promise rejection.
366 - Fix queued tasks count computation.
367
368 ### Removed
369
370 - Remove unneeded worker_threads worker `MessageChannel` internal usage for IPC.
371
372 ## [2.6.3] - 2023-06-19
373
374 ### Fixed
375
376 - Ensure no tasks are queued when trying to soft kill a dynamic worker.
377 - Update strategies internals after statistics computation.
378
379 ### Changed
380
381 - Optimize O(1) queue implementation.
382
383 ## [2.6.2] - 2023-06-12
384
385 ### Fixed
386
387 - Fix new worker use after creation in dynamic pool given the current worker choice strategy.
388
389 ## [2.6.1] - 2023-06-10
390
391 ### Added
392
393 - Add worker choice strategy documentation: [README.md](./docs/worker-choice-strategies.md).
394
395 ### Fixed
396
397 - Fix average statistics computation: ensure failed tasks are not accounted.
398
399 ## [2.6.0] - 2023-06-09
400
401 ### Added
402
403 - Add `LEAST_ELU` worker choice strategy (experimental).
404 - Add tasks ELU instead of runtime support to `FAIR_SHARE` worker choice strategy.
405
406 ### Changed
407
408 - Refactor pool worker node usage internals.
409 - Breaking change: refactor worker choice strategy statistics requirements: the syntax of the worker choice strategy options has changed.
410 - Breaking change: pool information `info` property object fields have been renamed.
411
412 ### Fixed
413
414 - Fix wait time accounting.
415 - Ensure worker choice strategy `LEAST_BUSY` accounts also tasks wait time.
416 - Ensure worker choice strategy `LEAST_USED` accounts also queued tasks.
417
418 ## [2.5.4] - 2023-06-07
419
420 ### Added
421
422 - Add Event Loop Utilization (ELU) statistics to worker tasks usage.
423
424 ### Changed
425
426 - Compute statistics at the worker level only if needed.
427 - Add `worker_threads` options to thread pool options.
428
429 ### Fixed
430
431 - Make the `LEAST_BUSY` strategy only relies on task runtime.
432
433 ## [2.5.3] - 2023-06-04
434
435 ### Changed
436
437 - Refine pool information content.
438 - Limit pool internals public exposure.
439
440 ## [2.5.2] - 2023-06-02
441
442 ### Added
443
444 - Add `taskError` pool event for task execution error.
445 - Add pool information `info` property to pool.
446 - Emit pool information on `busy` and `full` pool events.
447
448 ## [2.5.1] - 2023-06-01
449
450 ### Added
451
452 - Add pool option `restartWorkerOnError` to restart worker on uncaught error. Default to `true`.
453 - Add `error` pool event for uncaught worker error.
454
455 ## [2.5.0] - 2023-05-31
456
457 ### Added
458
459 - Switch pool event emitter to `EventEmitterAsyncResource`.
460 - Add tasks wait time accounting in per worker tasks usage.
461 - Add interleaved weighted round robin `INTERLEAVED_WEIGHTED_ROUND_ROBIN` worker choice strategy (experimental).
462
463 ### Changed
464
465 - Renamed worker choice strategy `LESS_BUSY` to `LEAST_BUSY` and `LESS_USED` to `LEAST_USED`.
466
467 ## [2.4.14] - 2023-05-09
468
469 ### Fixed
470
471 - Ensure no undefined task runtime can land in the tasks history.
472 - Fix median computation implementation once again.
473
474 ### Added
475
476 - Unit tests for median and queue implementations.
477
478 ## [2.4.13] - 2023-05-08
479
480 ### Fixed
481
482 - Fix worker choice strategy options validation.
483 - Fix fair share worker choice strategy internals update: ensure virtual task end timestamp is computed at task submission.
484
485 ## [2.4.12] - 2023-05-06
486
487 ### Added
488
489 - Support multiple task functions per worker.
490 - Add custom worker weights support to worker choice strategies options.
491
492 ### Changed
493
494 - Use O(1) queue implementation for tasks queueing.
495
496 ### Fixed
497
498 - Fix median computation implementation.
499 - Fix fair share worker choice strategy internals update.
500
501 ## [2.4.11] - 2023-04-23
502
503 ### Changed
504
505 - Optimize free worker finding in worker choice strategies.
506
507 ## [2.4.10] - 2023-04-15
508
509 ### Fixed
510
511 - Fix typescript type definition for task function: ensure the input data is optional.
512 - Fix typescript type definition for pool execute(): ensure the input data is optional.
513
514 ## [2.4.9] - 2023-04-15
515
516 ### Added
517
518 - Add tasks queue enablement runtime setter to pool.
519 - Add tasks queue options runtime setter to pool.
520 - Add worker choice strategy options runtime setter to pool.
521
522 ### Changed
523
524 - Remove the tasks queuing experimental status.
525
526 ### Fixed
527
528 - Fix task function type definition and validation.
529 - Fix worker choice strategy options handling.
530
531 ## [2.4.8] - 2023-04-12
532
533 ### Fixed
534
535 - Fix message between main worker and worker type definition for tasks.
536 - Fix code documentation.
537
538 ## [2.4.7] - 2023-04-11
539
540 ### Added
541
542 - Add worker tasks queue options to pool options.
543
544 ### Fixed
545
546 - Fix missing documentation.
547
548 ## [2.4.6] - 2023-04-10
549
550 ### Fixed
551
552 - Ensure one task at a time is executed per worker with tasks queueing enabled.
553 - Properly count worker executing tasks with tasks queueing enabled.
554
555 ## [2.4.5] - 2023-04-09
556
557 ### Added
558
559 - Use monotonic high resolution timer for worker tasks runtime.
560 - Add worker tasks median runtime to statistics.
561 - Add worker tasks queue (experimental).
562
563 ## [2.4.4] - 2023-04-07
564
565 ### Added
566
567 - Add `PoolEvents` enumeration and `PoolEvent` type.
568
569 ### Fixed
570
571 - Destroy worker only on alive check.
572
573 ## [2.4.3] - 2023-04-07
574
575 ### Fixed
576
577 - Fix typedoc generation with inheritance.
578
579 ## [2.4.2] - 2023-04-06
580
581 ### Added
582
583 - Add `full` event to dynamic pool.
584 - Keep worker choice strategy in memory for conditional reuse.
585
586 ### Fixed
587
588 - Fix possible negative worker key at worker removal in worker choice strategies.
589
590 ## [2.4.1] - 2023-04-05
591
592 ### Changed
593
594 - Optimize worker choice strategy for dynamic pool.
595
596 ### Fixed
597
598 - Ensure dynamic pool does not alter worker choice strategy expected behavior.
599
600 ## [2.4.0] - 2023-04-04
601
602 ### Added
603
604 - Add `LESS_BUSY` worker choice strategy.
605
606 ### Changed
607
608 - Optimize worker storage in pool.
609 - Optimize worker alive status check.
610 - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
611 - Optimize `LESS_USED` worker choice strategy.
612 - Update benchmarks versus external threads pools.
613 - Optimize tasks usage statistics requirements for worker choice strategy.
614
615 ### Fixed
616
617 - Ensure trimmable characters are checked at pool initialization.
618 - Fix message id integer overflow.
619 - Fix pool worker removal in worker choice strategy internals.
620 - Fix package publication with pnpm.
621
622 ## [2.4.0-3] - 2023-04-04
623
624 ### Added
625
626 - Add `LESS_BUSY` worker choice strategy.
627
628 ### Changed
629
630 - Optimize worker storage in pool.
631 - Optimize worker alive status check.
632 - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
633 - Optimize `LESS_USED` worker choice strategy.
634 - Update benchmarks versus external threads pools.
635
636 ### Fixed
637
638 - Ensure trimmable characters are checked at pool initialization.
639 - Fix message id integer overflow.
640 - Fix pool worker removal in worker choice strategy internals.
641 - Fix package publication with pnpm.
642
643 ## [2.4.0-2] - 2023-04-03
644
645 ### Added
646
647 - Add `LESS_BUSY` worker choice strategy.
648
649 ### Changed
650
651 - Optimize worker storage in pool.
652 - Optimize worker alive status check.
653 - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
654 - Optimize `LESS_USED` worker choice strategy.
655
656 ### Fixed
657
658 - Ensure trimmable characters are checked at pool initialization.
659 - Fix message id integer overflow.
660 - Fix pool worker removal in worker choice strategy internals.
661 - Fix package publication with pnpm.
662
663 ## [2.4.0-1] - 2023-04-03
664
665 ### Added
666
667 - Add `LESS_BUSY` worker choice strategy.
668
669 ### Changed
670
671 - Optimize worker storage in pool.
672 - Optimize worker alive status check.
673 - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
674 - Optimize `LESS_USED` worker choice strategy.
675
676 ### Fixed
677
678 - Ensure trimmable characters are checked at pool initialization.
679 - Fix message id integer overflow.
680 - Fix pool worker removal in worker choice strategy internals.
681
682 ## [2.4.0-0] - 2023-04-03
683
684 ### Added
685
686 - Add `LESS_BUSY` worker choice strategy.
687
688 ### Changed
689
690 - Optimize worker storage in pool.
691 - Optimize worker alive status check.
692 - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
693 - Optimize `LESS_USED` worker choice strategy.
694
695 ### Fixed
696
697 - Ensure trimmable characters are checked at pool initialization.
698 - Fix message id integer overflow.
699 - Fix pool worker removal in worker choice strategy internals.
700
701 ## [2.3.10] - 2023-03-18
702
703 ### Fixed
704
705 - Fix package.json `exports` syntax for ESM and CommonJS.
706
707 ### Changed
708
709 - Permit SemVer pre-release publication.
710
711 ## [2.3.10-2] - 2023-03-18
712
713 ### Fixed
714
715 - Fix package.json `exports` syntax for ESM and CommonJS.
716
717 ## [2.3.10-1] - 2023-03-18
718
719 ### Changed
720
721 - Permit SemVer pre-release publication.
722
723 ## [2.3.10-0] - 2023-03-18
724
725 ### Fixed
726
727 - Fix package.json `exports` syntax for ESM and CommonJS.
728
729 ## [2.3.9] - 2023-03-18
730
731 ### Changed
732
733 - Introduce ESM module support along with CommonJS one.
734
735 ### Fixed
736
737 - Fix brown paper bag bug referencing the same object literal.
738
739 ## [2.3.8] - 2023-03-18
740
741 ### Changed
742
743 - Switch internal benchmarking code to benny.
744 - Switch to TypeScript 5.x.x.
745 - Switch rollup bundler plugins to core ones.
746 - Switch to TSDoc syntax.
747 - Enforce conventional commits.
748
749 ### Fixed
750
751 - Fix random integer generator.
752 - Fix worker choice strategy pool type identification at initialization.
753
754 ## [2.3.7] - 2022-10-23
755
756 ### Changed
757
758 - Switch to open collective FOSS project funding platform.
759 - Switch to ts-standard linter configuration on TypeScript code.
760
761 ### Fixed
762
763 - Fixed missing async on pool execute method.
764 - Fixed typing in TypeScript example.
765 - Fixed types in unit tests.
766
767 ## [2.3.6] - 2022-10-22
768
769 ### Changed
770
771 - Cleanup pool attributes and methods.
772 - Refine error types thrown.
773
774 ### Fixed
775
776 - Fix continuous integration build on windows.
777 - Fix code coverage reporting by using c8 instead of nyc.
778
779 ## [2.3.5] - 2022-10-21
780
781 ### Changed
782
783 - Improve benchmarks: add IO intensive task workload, add task size option, integrate code into linter.
784 - Optimize tasks usage lookup implementation.
785
786 ### Fixed
787
788 - Fix missed pool event emitter type export.
789 - Fix typedoc documentation generation.
790
791 ## [2.3.4] - 2022-10-17
792
793 ### Added
794
795 - Fully automate release process with release-it.
796
797 ### Changed
798
799 - Optimize fair share task scheduling algorithm implementation.
800 - Update benchmarks versus external pools results with latest version.
801
802 ## [2.3.3] - 2022-10-15
803
804 ### Added
805
806 - Add support for [cluster settings](https://nodejs.org/api/cluster.html#cluster_cluster_settings) in cluster pool options.
807
808 ## [2.3.2] - 2022-10-14
809
810 ### Changed
811
812 - Optimize fair share worker selection strategy implementation.
813
814 ### Fixed
815
816 - Fix WRR worker selection strategy: ensure the condition triggering the round robin can be fulfilled.
817
818 ## [2.3.1] - 2022-10-13
819
820 ### Added
821
822 - Pool worker choice strategies:
823 - `WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN` strategy based on weighted round robin scheduling algorithm using tasks execution time for now.
824 - `WorkerChoiceStrategies.FAIR_SHARE` strategy based on fair share scheduling algorithm using tasks execution time for now.
825
826 ## [2.2.2] - 2022-10-09
827
828 ### Fixed
829
830 - Fixed `README.md` file.
831
832 ## [2.2.1] - 2022-10-08
833
834 ### Added
835
836 - Dynamic worker choice strategy change at runtime.
837
838 ## [2.2.0] - 2022-01-05
839
840 ### Breaking Changes
841
842 - Support only Node.js version 16.x.x for cluster pool: upstream cluster API have changed on that version.
843
844 ## [2.1.0] - 2021-08-29
845
846 ### Added
847
848 - Add an optional pool option `messageHandler` to `PoolOptions<Worker>` for registering a message handler callback on each worker.
849
850 ### Breaking Changes
851
852 - `AbstractWorker` class `maxInactiveTime`, `killBehavior` and `async` attributes have been removed in favour of the same ones in the worker options `opts` public attribute.
853 - `AbstractWorker` class `lastTask` attribute have been renamed to `lastTaskTimestamp`.
854 - `AbstractWorker` class `interval` attribute have been renamed to `aliveInterval`.
855 - `AbstractWorker` class cannot be instantiated without specifying the `mainWorker` argument referencing the main worker.
856
857 ## [2.0.2] - 2021-05-12
858
859 ### Bug fixes
860
861 - Fix `busy` event emission on fixed pool type
862
863 ## [2.0.1] - 2021-03-16
864
865 ### Bug fixes
866
867 - Check if pool options are properly set.
868 - `busy` event is emitted on all pool types.
869
870 ## [2.0.0] - 2021-03-01
871
872 ### Bug fixes
873
874 - Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
875
876 ### Breaking Changes
877
878 - `FullPool` event is now renamed to `busy`.
879 - `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
880 _Find more details on our JSDoc._
881
882 - `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed.
883
884 - We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
885
886 ### Pool options types declaration merge
887
888 `FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
889
890 #### New `export` strategy
891
892 ```js
893 // Before
894 const DynamicThreadPool = require('poolifier/lib/dynamic')
895 // After
896 const { DynamicThreadPool } = require('poolifier/lib/dynamic')
897 ```
898
899 But you should always prefer just using
900
901 ```js
902 const { DynamicThreadPool } = require('poolifier')
903 ```
904
905 #### New type definitions for input data and response
906
907 For cluster worker and worker-thread pools, you can now only send and receive structured-cloneable data.
908 _This is not a limitation by poolifier but Node.js._
909
910 #### Public property replacements
911
912 `numWorkers` property is now `numberOfWorkers`
913
914 #### Internal (protected) properties and methods renaming
915
916 These properties are not intended for end users
917
918 - `id` => `nextMessageId`
919
920 These methods are not intended for end users
921
922 - `_chooseWorker` => `chooseWorker`
923 - `_newWorker` => `createWorker`
924 - `_execute` => `internalExecute`
925 - `_chooseWorker` => `chooseWorker`
926 - `_checkAlive` => `checkAlive`
927 - `_run` => `run`
928 - `_runAsync` => `runAsync`
929
930 ## [1.1.0] - 2020-05-21
931
932 ### Added
933
934 - ThreadWorker support async functions as option
935 - Various external library patches
936
937 ## [1.0.0] - 2020-01-24
938
939 ### Added
940
941 - FixedThreadPool implementation
942 - DynamicThreadPool implementation
943 - WorkerThread implementation to improve developer experience