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