build(deps-dev): apply updates
[poolifier.git] / CHANGELOG.md
CommitLineData
522eea03 1# Changelog
2
3All notable changes to this project will be documented in this file.
4
d4abc60a 5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
522eea03 6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
45a5a54c
JB
8## [Unreleased]
9
e9dc6efa
JB
10## [2.6.26] - 2023-08-15
11
2b099bf7
JB
12### Added
13
14- Add kill handler to worker options allowing to execute custom code when worker is killed.
1a3e01ba 15- Add listTaskFunctions() method to pool API.
9aef1431 16- SMTP server pool example: nodemailer.
2b099bf7 17
5b726f72
JB
18## [2.6.25] - 2023-08-13
19
72855e92
JB
20### Added
21
3b311539 22- HTTP server pool examples: fastify-cluster, fastify-hybrid.
02999424 23- WebSocket server pool examples: ws-cluster, ws-hybrid.
72855e92 24
7aadd6e5
JB
25## [2.6.24] - 2023-08-12
26
7d91a8cd
JB
27### Added
28
29- Add array of transferable objects to the `execute()` method arguments.
02999424 30- WebSocket server pool examples: ws-worker_threads.
7d91a8cd 31
6b4263b4
JB
32## [2.6.23] - 2023-08-11
33
3d76750a 34### Fixed
8e0af894 35
3d76750a 36- 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.
9606b474 37
3d76750a
JB
38### Added
39
40- HTTP client pool examples: fetch, node-fetch and axios with multiple task functions.
02999424 41- HTTP server pool examples: express-worker_threads, fastify-worker_threads.
3d76750a
JB
42
43## [2.6.22] - 2023-08-10
9606b474 44
3d76750a 45### Fixed
9606b474
JB
46
47- Add missing `types` field to package.json `exports`.
48
3d76750a
JB
49### Changed
50
51- Structure markdown documentation (PR #811).
52
d9647bdd
JB
53## [2.6.21] - 2023-08-03
54
2111ec12
JB
55### Changed
56
57- Improve code documentation.
58- Code refactoring and cleanup for better maintainability and readability.
59
5c30b9d9
JB
60## [2.6.20] - 2023-07-21
61
10ecf8fd
JB
62### Fixed
63
64- Fix queued tasks redistribution on error task execution starvation.
4e377863 65- Ensure task queueing per worker condition is untangled from the pool busyness semantic.
10ecf8fd 66
aa9eede8
JB
67### Changed
68
7c89e6a4 69- Drastically reduce lookups by worker in the worker nodes.
aa9eede8 70
62485908
JB
71## [2.6.19] - 2023-07-20
72
2e2ef9c3
JB
73### Added
74
75- Dedicated internal communication channel for worker_threads pools.
76
8f4c9491
JB
77## [2.6.18] - 2023-07-19
78
8660b972
JB
79### Changed
80
81- Code refactoring and cleanup for better maintainability and readability. Bundle size is a bit smaller.
82
206a3519
JB
83## [2.6.17] - 2023-07-16
84
b4899fae
JB
85### Added
86
1a3e01ba 87- Add `listTaskFunctions()` method to worker API.
b4899fae 88
58a06a6c
JB
89## [2.6.16] - 2023-07-12
90
2a69b8c5
JB
91### Fixed
92
80520ca4 93- Fix pool startup detection.
2a69b8c5
JB
94- Fix worker task functions handling.
95
b5900b02
JB
96## [2.6.15] - 2023-07-11
97
19dbc45b
JB
98### Added
99
100- Take into account worker node readiness in worker choice strategies.
101
4a0db581
JB
102## [2.6.14] - 2023-07-10
103
87e44747
JB
104### Fixed
105
106- Fix task function statistics tracking.
107
0265272f
JB
108## [2.6.13] - 2023-07-10
109
968a2e8c
JB
110### Added
111
112- Add per task function statistics tracking.
782299f8 113- Add public methods to manipulate the worker task functions at runtime.
968a2e8c 114
44c8c00f
JB
115## [2.6.12] - 2023-07-09
116
aa4bf4b2
JB
117### Fixed
118
119- Workaround import issue with `node:os` module in node 16.x.x.
120
b7cfced1
JB
121## [2.6.11] - 2023-07-09
122
d5024c00
JB
123### Fixed
124
125- Fix pool readiness semantic.
126
f313a208
JB
127## [2.6.10] - 2023-07-08
128
2431bdb4
JB
129### Fixed
130
131- Ensure workers are not recreated on error at pool startup.
132
133### Added
134
135- Add `ready` and `strategy` fields to pool information.
136- Add pool event `ready` to notify when the number of workers created in the pool has reached the maximum size expected and are ready.
caadbd41 137- Add dynamic pool sizing checks.
2431bdb4 138
369d0a51
JB
139## [2.6.9] - 2023-07-07
140
2845f2a5
JB
141### Fixed
142
143- Recreate the right worker type on uncaught exception.
144
145### Added
146
147- Add minimum and maximum to internal measurement statistics.
1dcf8b7b 148- Add `runTime` and `waitTime` to pool information.
75d3401a 149- Check worker inactive time only on dynamic worker.
2845f2a5 150
fc97d613
JB
151## [2.6.8] - 2023-07-03
152
92b1feaa
JB
153### Fixed
154
155- Brown paper bag release to fix version handling in pool information.
156
52d54060
JB
157## [2.6.7] - 2023-07-03
158
5bc91f3e
JB
159### Fixed
160
161- Ensure worker queued tasks at error are reassigned to other pool workers.
162
afe0d5bf
JB
163### Added
164
165- Add pool `utilization` ratio to pool information.
23ccf9d7 166- Add `version` to pool information.
e5b3047d 167- Add worker information to worker nodes.
afe0d5bf 168
f42c583f
JB
169## [2.6.6] - 2023-07-01
170
6961ca9a
JB
171### Added
172
173- Add safe helper `availableParallelism` to help sizing the pool.
174
3749facb
JB
175### Fixed
176
177- Ensure message handler is only registered in worker.
178
6fed2513
JB
179## [2.6.5] - 2023-06-27
180
c72f6987
JB
181### Known issues
182
70726c28 183- Cluster pools tasks execution are not working by using ESM files extension: https://github.com/poolifier/poolifier/issues/782
c72f6987
JB
184
185### Fixed
186
187- Artificial version bump to 2.6.5 to workaround publication issue.
188- Ensure cluster pool destroy() gracefully shutdowns worker's server.
189- Ensure pool event is emitted before task error promise rejection.
190- Fix queued tasks count computation.
191
192### Removed
193
2fbe1783 194- Remove unneeded worker_threads worker `MessageChannel` internal usage for IPC.
c72f6987 195
6426631b
JB
196## [2.6.4] - 2023-06-27
197
941f9a7c
JB
198### Known issues
199
70726c28 200- Cluster pools tasks execution are not working by using ESM files extension: https://github.com/poolifier/poolifier/issues/782
941f9a7c 201
2c039e43
JB
202### Fixed
203
204- Ensure cluster pool destroy() gracefully shutdowns worker's server.
205- Ensure pool event is emitted before task error promise rejection.
9c16fb4b 206- Fix queued tasks count computation.
2c039e43 207
941f9a7c
JB
208### Removed
209
2fbe1783 210- Remove unneeded worker_threads worker `MessageChannel` internal usage for IPC.
941f9a7c 211
bc1b0765
JB
212## [2.6.3] - 2023-06-19
213
a6a2dc4c
JB
214### Fixed
215
216- Ensure no tasks are queued when trying to soft kill a dynamic worker.
f0d7f803 217- Update strategies internals after statistics computation.
a6a2dc4c 218
7b56f532
JB
219### Changed
220
221- Optimize O(1) queue implementation.
222
b628596c
JB
223## [2.6.2] - 2023-06-12
224
a9e89d00
JB
225### Fixed
226
227- Fix new worker use after creation in dynamic pool given the current worker choice strategy.
228
4368a898
JB
229## [2.6.1] - 2023-06-10
230
931d43e2
JB
231### Added
232
13ab5b87 233- Add worker choice strategy documentation: [README.md](./docs/worker-choice-strategies.md).
931d43e2 234
f1c06930
JB
235### Fixed
236
237- Fix average statistics computation: ensure failed tasks are not accounted.
238
16671b07
JB
239## [2.6.0] - 2023-06-09
240
a1347286
JB
241### Added
242
5af9c0f7 243- Add `LEAST_ELU` worker choice strategy (experimental).
9adcefab 244- Add tasks ELU instead of runtime support to `FAIR_SHARE` worker choice strategy.
a1347286 245
1c6fe997
JB
246### Changed
247
248- Refactor pool worker node usage internals.
477f48e7 249- Breaking change: refactor worker choice strategy statistics requirements: the syntax of the worker choice strategy options has changed.
f63a9dda 250- Breaking change: pool information `info` property object fields have been renamed.
1c6fe997
JB
251
252### Fixed
253
254- Fix wait time accounting.
255- Ensure worker choice strategy `LEAST_BUSY` accounts also tasks wait time.
256- Ensure worker choice strategy `LEAST_USED` accounts also queued tasks.
257
aa07d6ee
JB
258## [2.5.4] - 2023-06-07
259
b6b32453
JB
260### Added
261
262- Add Event Loop Utilization (ELU) statistics to worker tasks usage.
263
264### Changed
265
266- Compute statistics at the worker level only if needed.
2fbe1783 267- Add `worker_threads` options to thread pool options.
b6b32453 268
272d4d8f
JB
269### Fixed
270
271- Make the `LEAST_BUSY` strategy only relies on task runtime.
272
ed47fb3d
JB
273## [2.5.3] - 2023-06-04
274
89a4abfd
JB
275### Changed
276
277- Refine pool information content.
b4213b7f 278- Limit pool internals public exposure.
89a4abfd 279
8a9febf5
JB
280## [2.5.2] - 2023-06-02
281
91ee39ed
JB
282### Added
283
284- Add `taskError` pool event for task execution error.
6b27d407 285- Add pool information `info` property to pool.
91ee39ed
JB
286- Emit pool information on `busy` and `full` pool events.
287
8babb151
JB
288## [2.5.1] - 2023-06-01
289
0e05c4dc
JB
290### Added
291
1f68cede 292- Add pool option `restartWorkerOnError` to restart worker on uncaught error. Default to `true`.
91ee39ed 293- Add `error` pool event for uncaught worker error.
0e05c4dc 294
a8766181
JB
295## [2.5.0] - 2023-05-31
296
e4543b14
JB
297### Added
298
299- Switch pool event emitter to `EventEmitterAsyncResource`.
6da80d38 300- Add tasks wait time accounting in per worker tasks usage.
5af9c0f7 301- Add interleaved weighted round robin `INTERLEAVED_WEIGHTED_ROUND_ROBIN` worker choice strategy (experimental).
e4543b14
JB
302
303### Changed
304
305- Renamed worker choice strategy `LESS_BUSY` to `LEAST_BUSY` and `LESS_USED` to `LEAST_USED`.
306
570efb11
JB
307## [2.4.14] - 2023-05-09
308
b0f28bad
JB
309### Fixed
310
311- Ensure no undefined task runtime can land in the tasks history.
312- Fix median computation implementation once again.
313
110b6d13
JB
314### Added
315
316- Unit tests for median and queue implementations.
317
72584880
JB
318## [2.4.13] - 2023-05-08
319
b0d6ed8f
JB
320### Fixed
321
e3058615 322- Fix worker choice strategy options validation.
b0d6ed8f
JB
323- Fix fair share worker choice strategy internals update: ensure virtual task end timestamp is computed at task submission.
324
06140c32
JB
325## [2.4.12] - 2023-05-06
326
a86b6df1
JB
327### Added
328
329- Support multiple task functions per worker.
08f3f44c 330- Add custom worker weights support to worker choice strategies options.
a86b6df1 331
29ee7e9a
JB
332### Changed
333
334- Use O(1) queue implementation for tasks queueing.
335
0682ba15
JB
336### Fixed
337
338- Fix median computation implementation.
339- Fix fair share worker choice strategy internals update.
340
936d53ec
JB
341## [2.4.11] - 2023-04-23
342
cb70b19d
JB
343### Changed
344
345- Optimize free worker finding in worker choice strategies.
346
15bb637a
JB
347## [2.4.10] - 2023-04-15
348
ef41a6e6
JB
349### Fixed
350
82ea6492 351- Fix typescript type definition for task function: ensure the input data is optional.
ef41a6e6
JB
352- Fix typescript type definition for pool execute(): ensure the input data is optional.
353
181eb2b4
JB
354## [2.4.9] - 2023-04-15
355
a20f0ba5
JB
356### Added
357
358- Add tasks queue enablement runtime setter to pool.
359- Add tasks queue options runtime setter to pool.
360- Add worker choice strategy options runtime setter to pool.
361
362### Changed
363
364- Remove the tasks queuing experimental status.
365
d4aeae5a
JB
366### Fixed
367
82ea6492 368- Fix task function type definition and validation.
2fc5cae3 369- Fix worker choice strategy options handling.
d4aeae5a 370
1d9e7023
JB
371## [2.4.8] - 2023-04-12
372
f9b4bbf8
JB
373### Fixed
374
375- Fix message between main worker and worker type definition for tasks.
376- Fix code documentation.
377
12ae3210
JB
378## [2.4.7] - 2023-04-11
379
7171d33f
JB
380### Added
381
382- Add worker tasks queue options to pool options.
383
e8bd29ce
JB
384### Fixed
385
386- Fix missing documentation.
387
42c7bc10
JB
388## [2.4.6] - 2023-04-10
389
681196cc
JB
390### Fixed
391
392- Ensure one task at a time is executed per worker with tasks queueing enabled.
1c6fe997 393- Properly count worker executing tasks with tasks queueing enabled.
681196cc 394
54d360e3
JB
395## [2.4.5] - 2023-04-09
396
3fafb1b2
JB
397### Added
398
9e775f96
JB
399- Use monotonic high resolution timer for worker tasks runtime.
400- Add worker tasks median runtime to statistics.
ff733df7 401- Add worker tasks queue (experimental).
3fafb1b2 402
92fa3eb6
JB
403## [2.4.4] - 2023-04-07
404
aee46736
JB
405### Added
406
407- Add `PoolEvents` enumeration and `PoolEvent` type.
408
36b5e78f
JB
409### Fixed
410
ff0c2b3e 411- Destroy worker only on alive check.
36b5e78f 412
9fb0f324
JB
413## [2.4.3] - 2023-04-07
414
28cf3617
JB
415### Fixed
416
417- Fix typedoc generation with inheritance.
418
848f0f27
JB
419## [2.4.2] - 2023-04-06
420
164d950a
JB
421### Added
422
423- Add `full` event to dynamic pool.
32417142 424- Keep worker choice strategy in memory for conditional reuse.
164d950a 425
78ab2555
JB
426### Fixed
427
428- Fix possible negative worker key at worker removal in worker choice strategies.
429
79aafe9f
JB
430## [2.4.1] - 2023-04-05
431
9cd39dd4
JB
432### Changed
433
434- Optimize worker choice strategy for dynamic pool.
435
965415bb
JB
436### Fixed
437
438- Ensure dynamic pool does not alter worker choice strategy expected behavior.
439
d8b60b1c
JB
440## [2.4.0] - 2023-04-04
441
c6bd2650
JB
442### Added
443
444- Add `LESS_BUSY` worker choice strategy.
445
446### Changed
447
448- Optimize worker storage in pool.
449- Optimize worker alive status check.
450- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
451- Optimize `LESS_USED` worker choice strategy.
452- Update benchmarks versus external threads pools.
453- Optimize tasks usage statistics requirements for worker choice strategy.
454
455### Fixed
456
457- Ensure trimmable characters are checked at pool initialization.
458- Fix message id integer overflow.
459- Fix pool worker removal in worker choice strategy internals.
460- Fix package publication with pnpm.
461
d0a3f018
JB
462## [2.4.0-3] - 2023-04-04
463
b2ede285
JB
464### Added
465
466- Add `LESS_BUSY` worker choice strategy.
467
468### Changed
469
470- Optimize worker storage in pool.
471- Optimize worker alive status check.
472- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
473- Optimize `LESS_USED` worker choice strategy.
474- Update benchmarks versus external threads pools.
475
476### Fixed
477
478- Ensure trimmable characters are checked at pool initialization.
479- Fix message id integer overflow.
480- Fix pool worker removal in worker choice strategy internals.
481- Fix package publication with pnpm.
482
a015ea40
JB
483## [2.4.0-2] - 2023-04-03
484
698f4bbc
JB
485### Added
486
487- Add `LESS_BUSY` worker choice strategy.
488
489### Changed
490
491- Optimize worker storage in pool.
492- Optimize worker alive status check.
493- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
494- Optimize `LESS_USED` worker choice strategy.
495
496### Fixed
497
498- Ensure trimmable characters are checked at pool initialization.
499- Fix message id integer overflow.
500- Fix pool worker removal in worker choice strategy internals.
501- Fix package publication with pnpm.
502
8fe15920
JB
503## [2.4.0-1] - 2023-04-03
504
5b301c28
JB
505### Added
506
507- Add `LESS_BUSY` worker choice strategy.
508
509### Changed
510
511- Optimize worker storage in pool.
512- Optimize worker alive status check.
513- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
514- Optimize `LESS_USED` worker choice strategy.
515
516### Fixed
517
518- Ensure trimmable characters are checked at pool initialization.
519- Fix message id integer overflow.
520- Fix pool worker removal in worker choice strategy internals.
521
2fb9ca9c
JB
522## [2.4.0-0] - 2023-04-03
523
168c526f
JB
524### Added
525
526- Add `LESS_BUSY` worker choice strategy.
527
1d71a908
JB
528### Changed
529
ffcbbad8 530- Optimize worker storage in pool.
1d71a908 531- Optimize worker alive status check.
65a60b3b 532- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
737c6d97 533- Optimize `LESS_USED` worker choice strategy.
1d71a908 534
ffcbbad8
JB
535### Fixed
536
537- Ensure trimmable characters are checked at pool initialization.
b4e75778 538- Fix message id integer overflow.
97a2abc3 539- Fix pool worker removal in worker choice strategy internals.
ffcbbad8 540
08372738
JB
541## [2.3.10] - 2023-03-18
542
710826bc
JB
543### Fixed
544
9606b474 545- Fix package.json `exports` syntax for ESM and CommonJS.
710826bc
JB
546
547### Changed
548
549- Permit SemVer pre-release publication.
76e5ac6f 550
e4796ecd
JB
551## [2.3.10-2] - 2023-03-18
552
6abad580
JB
553### Fixed
554
9606b474 555- Fix package.json `exports` syntax for ESM and CommonJS.
6abad580 556
a2ee98cc
JB
557## [2.3.10-1] - 2023-03-18
558
7e060cee
JB
559### Changed
560
90483887 561- Permit SemVer pre-release publication.
7e060cee 562
c81bfafb
JB
563## [2.3.10-0] - 2023-03-18
564
fe18768d
JB
565### Fixed
566
9606b474 567- Fix package.json `exports` syntax for ESM and CommonJS.
fe18768d 568
d7b78217
JB
569## [2.3.9] - 2023-03-18
570
ed6dd37f
JB
571### Changed
572
573- Introduce ESM module support along with CommonJS one.
574
575### Fixed
576
577- Fix brown paper bag bug referencing the same object literal.
578
68e2ad86
JB
579## [2.3.8] - 2023-03-18
580
ca6c7d70
JB
581### Changed
582
583- Switch internal benchmarking code to benny.
fbdedeb9
JB
584- Switch to TypeScript 5.x.x.
585- Switch rollup bundler plugins to core ones.
ed6dd37f 586- Switch to TSDoc syntax.
fbdedeb9 587- Enforce conventional commits.
ca6c7d70 588
d15211d4
JB
589### Fixed
590
591- Fix random integer generator.
fbdedeb9 592- Fix worker choice strategy pool type identification at initialization.
d15211d4 593
995705ea
JB
594## [2.3.7] - 2022-10-23
595
b953022b
JB
596### Changed
597
598- Switch to open collective FOSS project funding platform.
78cea37e
JB
599- Switch to ts-standard linter configuration on TypeScript code.
600
601### Fixed
602
603- Fixed missing async on pool execute method.
604- Fixed typing in TypeScript example.
605- Fixed types in unit tests.
b953022b 606
3b9f6953
JB
607## [2.3.6] - 2022-10-22
608
f80cead4
JB
609### Changed
610
611- Cleanup pool attributes and methods.
612- Refine error types thrown.
613
614### Fixed
615
616- Fix continuous integration build on windows.
617- Fix code coverage reporting by using c8 instead of nyc.
618
efc22107
JB
619## [2.3.5] - 2022-10-21
620
7a6a0a96
JB
621### Changed
622
a05c10de
JB
623- Improve benchmarks: add IO intensive task workload, add task size option, integrate code into linter.
624- Optimize tasks usage lookup implementation.
7a6a0a96 625
b4904890
JB
626### Fixed
627
628- Fix missed pool event emitter type export.
629- Fix typedoc documentation generation.
630
a875f8d1
JB
631## [2.3.4] - 2022-10-17
632
73cda448
JB
633### Added
634
635- Fully automate release process with release-it.
636
45a5a54c
JB
637### Changed
638
73cda448 639- Optimize fair share task scheduling algorithm implementation.
eb4a8a82 640- Update benchmarks versus external pools results with latest version.
45a5a54c 641
90ee1b18 642## [2.3.3] - 2022-10-15
1a76932b
JB
643
644### Added
645
646- Add support for [cluster settings](https://nodejs.org/api/cluster.html#cluster_cluster_settings) in cluster pool options.
647
90ee1b18 648## [2.3.2] - 2022-10-14
11df3590
JB
649
650### Changed
651
652- Optimize fair share worker selection strategy implementation.
653
654### Fixed
655
656- Fix WRR worker selection strategy: ensure the condition triggering the round robin can be fulfilled.
657
90ee1b18 658## [2.3.1] - 2022-10-13
23ff945a
JB
659
660### Added
661
662- Pool worker choice strategies:
663 - `WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN` strategy based on weighted round robin scheduling algorithm using tasks execution time for now.
664 - `WorkerChoiceStrategies.FAIR_SHARE` strategy based on fair share scheduling algorithm using tasks execution time for now.
665
90ee1b18 666## [2.2.2] - 2022-10-09
cb2b6c69
JB
667
668### Fixed
669
670- Fixed `README.md` file.
671
90ee1b18 672## [2.2.1] - 2022-10-08
bdacc2d2 673
bdaf31cd
JB
674### Added
675
676- Dynamic worker choice strategy change at runtime.
bdacc2d2 677
90ee1b18 678## [2.2.0] - 2022-01-05
7e0d447f
JB
679
680### Breaking Changes
681
9606b474 682- Support only Node.js version 16.x.x for cluster pool: upstream cluster API have changed on that version.
7e0d447f 683
90ee1b18 684## [2.1.0] - 2021-08-29
35cf1c03
JB
685
686### Added
687
688- Add an optional pool option `messageHandler` to `PoolOptions<Worker>` for registering a message handler callback on each worker.
e088a00c
JB
689
690### Breaking Changes
691
692- `AbstractWorker` class `maxInactiveTime`, `killBehavior` and `async` attributes have been removed in favour of the same ones in the worker options `opts` public attribute.
693- `AbstractWorker` class `lastTask` attribute have been renamed to `lastTaskTimestamp`.
694- `AbstractWorker` class `interval` attribute have been renamed to `aliveInterval`.
c365b2d3 695- `AbstractWorker` class cannot be instantiated without specifying the `mainWorker` argument referencing the main worker.
e088a00c 696
90ee1b18 697## [2.0.2] - 2021-05-12
14916bf9
JB
698
699### Bug fixes
700
701- Fix `busy` event emission on fixed pool type
702
90ee1b18 703## [2.0.1] - 2021-03-16
7f685093
JB
704
705### Bug fixes
706
707- Check if pool options are properly set.
708- `busy` event is emitted on all pool types.
709
90ee1b18 710## [2.0.0] - 2021-03-01
fa0f5b28 711
f3f833ab 712### Bug fixes
d63d3be3 713
ddbeaffd 714- Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
d63d3be3 715
fa0f5b28
S
716### Breaking Changes
717
7f685093 718- `FullPool` event is now renamed to `busy`.
1927ee67 719- `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
1a81f8af 720 _Find more details on our JSDoc._
ddbeaffd 721
1927ee67
APA
722- `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed.
723
ddbeaffd 724- We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
fa0f5b28 725
ec2ccfc8
JB
726### Pool options types declaration merge
727
728`FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
729
fa0f5b28
S
730#### New `export` strategy
731
732```js
733// Before
0eee77cb 734const DynamicThreadPool = require('poolifier/lib/dynamic')
fa0f5b28 735// After
0eee77cb 736const { DynamicThreadPool } = require('poolifier/lib/dynamic')
fa0f5b28
S
737```
738
739But you should always prefer just using
740
741```js
0eee77cb 742const { DynamicThreadPool } = require('poolifier')
fa0f5b28
S
743```
744
d3c8a1a8
S
745#### New type definitions for input data and response
746
6677a3d3 747For cluster worker and worker-thread pools, you can now only send and receive structured-cloneable data.
9606b474 748_This is not a limitation by poolifier but Node.js._
d3c8a1a8 749
3a4b605f 750#### Public property replacements
5c5a1fb7 751
3a4b605f 752`numWorkers` property is now `numberOfWorkers`
5c5a1fb7 753
280c2a77 754#### Internal (protected) properties and methods renaming
fa0f5b28 755
280c2a77
S
756These properties are not intended for end users
757
758- `id` => `nextMessageId`
759
760These methods are not intended for end users
fa0f5b28
S
761
762- `_chooseWorker` => `chooseWorker`
280c2a77 763- `_newWorker` => `createWorker`
fa0f5b28
S
764- `_execute` => `internalExecute`
765- `_chooseWorker` => `chooseWorker`
766- `_checkAlive` => `checkAlive`
767- `_run` => `run`
768- `_runAsync` => `runAsync`
769
90ee1b18 770## [1.1.0] - 2020-05-21
0312f71a
APA
771
772### Added
773
774- ThreadWorker support async functions as option
cf9aa6c3 775- Various external library patches
0312f71a 776
90ee1b18 777## [1.0.0] - 2020-01-24
522eea03 778
779### Added
780
781- FixedThreadPool implementation
782- DynamicThreadPool implementation
0312f71a 783- WorkerThread implementation to improve developer experience