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