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