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