fix: revert post commit eslint run disablement
[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 8## [Unreleased]
9aa78bcb 9
1b82b7cd
JB
10### Changed
11
12- Add mapExecute() helper to execute a task function on an iterable data's input
13 and return an array of responses.
14
b3b1857b
JB
15## [4.0.13] - 2024-05-29
16
fcfc3353
JB
17### Changed
18
19- Optimize tasks queue implementation.
20- Enable prioritized tasks queueing only when necessary.
21
8e41ea40
JB
22## [4.0.12] - 2024-05-25
23
cccbe18a
JB
24### Changed
25
26- Optimize circular buffer implementation to store task execution measurements.
27
b537ee9c
JB
28## [4.0.11] - 2024-05-21
29
05a852b8
JB
30### Changed
31
686b339e 32- Switch to optimized circular buffer implementation to store task execution measurements.
05a852b8 33
40d04d55
JB
34## [4.0.10] - 2024-05-20
35
152e87a8
JB
36### Fixed
37
38- Ensure tasks stealing dynamic worker node is not destroyed on inactivity.
39
ea2c5b8b
JB
40## [4.0.9] - 2024-05-19
41
b947a3c0
JB
42### Changed
43
44- Add ELU `utilization` statistics to pool information.
45
a19a4833
JB
46## [4.0.8] - 2024-05-15
47
91041638
JB
48### Fixed
49
50- Fix default task function worker choice strategy and priority handling.
51
71ccb3ae
JB
52## [4.0.7] - 2024-05-13
53
533a8e22
JB
54### Changed
55
56- Add ELU statistics to pool information.
57
f829e037
JB
58## [4.0.6] - 2024-05-10
59
8a7b12f1
JB
60### Fixed
61
62- Fix pools' `addTaskFunction()` type definition.
63
7cdb9e56
JB
64## [4.0.5] - 2024-05-09
65
3e645903
JB
66### Fixed
67
68- Avoid queued tasks redistribution on the errored worker node.
69
97c12ef2
JB
70## [4.0.4] - 2024-05-08
71
2eee7220
JB
72### Fixed
73
74- Disable `tasksStealingOnBackPressure` by default until performance issues under heavy load are sorted out.
75
04f996c1
JB
76## [4.0.3] - 2024-05-08
77
0d4e88b3
JB
78### Changed
79
80- Optimize task(s) stealing by dequeuing task(s) from the last prioritized bucket.
81
0de45de9
JB
82## [4.0.2] - 2024-05-06
83
9a55fa8c
JB
84### Fixed
85
86- Ensure poolifier worker task performance measurement requirements are synchronized with task function objects' worker choice strategies.
87
840d1755
JB
88## [4.0.1] - 2024-05-02
89
e0843544
JB
90### Fixed
91
92- Ensure dynamic worker node are initialized with sensible worker node usage default values to avoid worker choice strategies biased decisions.
93- Account for tasks wait time in task execution time computation in worker choice strategies to avoid biased decisions under load with several prioritized task functions and tasks queue enabled.
94
f18b1430
JB
95## [4.0.0] - 2024-04-30
96
f7a08a34
JB
97### Changed
98
3e3e2e5d
JB
99- Support per task function(s) priority and worker choice strategy definition via a task function object: `{ taskFunction: (data?: Data) => Response | Promise<Response>, priority?: number, strategy?: WorkerChoiceStrategy }`.
100- Add priority queue based tasks queueing. One priority queue is divided into prioritized buckets to avoid queued tasks starvation under load.
f7a08a34 101- BREAKING CHANGE: `listTaskFunctionNames()` to `listTaskFunctionsProperties()` in pool and worker API returning registered task functions properties.
3e3e2e5d
JB
102- BREAKING CHANGE: `strategy` field in pool information renamed to `defaultStrategy`.
103
104### Fixed
105
106- Ensure worker choice strategy options changes at runtime are propagated to poolifier workers.
f7a08a34 107
48eab590
JB
108## [3.1.30] - 2024-04-22
109
3e3e2e5d 110### Fixed
22bcc4f1
JB
111
112- Fix `transferList` argument type definition.
113
a2568a26
JB
114## [3.1.29] - 2024-04-02
115
3d720596
JB
116### Fixed
117
118- Fix possible race condition at worker node recreation on worker `error` and `exit` events.
119
d1fc382e
JB
120## [3.1.28] - 2024-04-01
121
60dc0a9c
JB
122### Fixed
123
124- Ensure the minimum number of workers on a started pool is guaranteed.
125
cf4c4b77
JB
126## [3.1.27] - 2024-03-27
127
1fee4f60
JB
128### Fixed
129
130- Fix publishing on JSR, take 4.
131
ac1f550f
JB
132## [3.1.26] - 2024-03-27
133
4ba59505
JB
134### Fixed
135
136- Fix publishing on JSR, take 3.
137
3b58238c
JB
138## [3.1.25] - 2024-03-27
139
41328ae5
JB
140### Fixed
141
142- Fix publishing on JSR, take 2.
143
8fddc9ad
JB
144## [3.1.24] - 2024-03-27
145
fcc6278e
JB
146### Fixed
147
148- Fix publishing on JSR.
149
7586f5a8
JB
150## [3.1.23] - 2024-03-27
151
b7bb8586
JB
152### Changed
153
154- Publish on JSR.
155
01f4a5ce
JB
156## [3.1.22] - 2024-03-15
157
d67bed32
JB
158### Fixed
159
160- Fix pool event emitter registered callbacks removal at `destroy()`.
161
6fd820e6
JB
162## [3.1.21] - 2024-02-22
163
369179f6
JB
164### Fixed
165
166- Fix null exception regression: [#1496](https://github.com/poolifier/poolifier/issues/1496).
167
c96e6364
JB
168## [3.1.20] - 2024-02-11
169
d20cde84
JB
170### Fixed
171
172- Ensure `worker_threads` workers are unreferenced at termination.
173
a7358578
JB
174## [3.1.19] - 2024-01-16
175
16d7e943
JB
176### Fixed
177
178- Fix possible null exception at task finishing handling.
179
57bf289f
JB
180### Changed
181
182- Optimize Deque implementation to improve tasks queueing performance.
183
7cf320c9
JB
184## [3.1.18] - 2024-01-06
185
6d7beb8c
JB
186### Fixed
187
188- Fix dynamic pool with minimum number of workers set to zero: [#1748](https://github.com/poolifier/poolifier/issues/1748).
189
a4bc8d0e
JB
190## [3.1.17] - 2024-01-05
191
2b6b412f
JB
192### Changed
193
194- Improve performance by clean up unneeded condition checks on hot code paths.
195
0d64fd53
JB
196## [3.1.16] - 2024-01-03
197
4302d959
JB
198### Fixed
199
200- Add missing type to TS type definitions.
201
9122cc2c
JB
202## [3.1.15] - 2024-01-02
203
a4d25410
JB
204### Fixed
205
206- Fix CommonJS support with TypeScript: [#1821](https://github.com/poolifier/poolifier/issues/1821).
207
565b7e65
JB
208## [3.1.15-0] - 2024-01-02
209
63406ebd
JB
210### Fixed
211
a4d25410 212- Fix CommonJS support with TypeScript: [#1821](https://github.com/poolifier/poolifier/issues/1821).
63406ebd 213
56412ef4
JB
214## [3.1.14] - 2024-01-01
215
e44639e9
JB
216### Fixed
217
218- Properly handle dynamic pool with zero minimum size.
219
5e133e82
JB
220## [3.1.13] - 2023-12-30
221
b20bf19a
JB
222### Changed
223
224- Reduce branching in several hot code paths.
225- Use faster object cloning implementation.
226
60aa9f2f
JB
227## [3.1.12] - 2023-12-27
228
28883f84
JB
229### Fixed
230
231- Fix tasks redistribution triggers at pool destroying.
232
233### Changed
234
235- Switch TypeScript module resolution to Node16.
236
164c80dd
JB
237## [3.1.12-0] - 2023-12-27
238
f4ef37a8
JB
239### Fixed
240
241- Fix tasks redistribution triggers at pool destroying.
242
0766991a
JB
243## [3.1.11] - 2023-12-24
244
5eb72b9e
JB
245### Fixed
246
247- Avoid worker node cross tasks stealing.
248- Ensure only half the pool worker nodes can steal tasks.
249
4618ccfd
JB
250## [3.1.10] - 2023-12-23
251
09616edb
JB
252### Changed
253
254- Avoid useless branching on pool type.
255
bba20209
JB
256## [3.1.9] - 2023-12-22
257
2889bd70
JB
258### Changed
259
260- Readd ThreadPoolOptions and ClusterPoolOptions TS type aliases to PoolOptions.
261
b1bbc365
JB
262## [3.1.8] - 2023-12-21
263
ad3836ed
JB
264### Fixed
265
266- Fix default worker weight computation.
267- Fix possible null exception at pool destroying.
268
72523ab9
JB
269## [3.1.7] - 2023-12-20
270
55d7d600
JB
271### Fixed
272
273- Ensure worker choice strategies implementation wait for worker node readiness: [#1748](https://github.com/poolifier/poolifier/issues/1748).
274
165f3d56
JB
275## [3.1.6] - 2023-12-18
276
85b2561d
JB
277### Fixed
278
279- Fix pool destroying with tasks queuing enabled.
280
6c8cec9e
JB
281## [3.1.5] - 2023-12-18
282
32b141fd
JB
283### Added
284
285- Add queued tasks end timeout support to worker node termination.
286
f11ec29c
JB
287## [3.1.4] - 2023-12-18
288
4e0afe97
JB
289### Fixed
290
291- Make more robust the fix for possible null exception at handling task execution response.
292
f592ef16
JB
293## [3.1.3] - 2023-12-17
294
9b358e72
JB
295### Fixed
296
297- Fix possible null exception at handling task execution response.
298
c61772e5
JB
299## [3.1.2] - 2023-12-17
300
87347ea8
JB
301### Fixed
302
32b141fd 303- Wait for queued tasks to end at worker node termination.
87347ea8 304
6e664bec
JB
305## [3.1.1] - 2023-12-16
306
51280f9b
JB
307### Fixed
308
309- Fix pool options TS type definition.
310
5362c66b
JB
311## [3.1.0] - 2023-12-16
312
c3719753
JB
313### Changed
314
315- TypeScript breaking change: merge ThreadPoolOptions and ClusterPoolOptions types into PoolOptions type.
316
42321a2b
JB
317## [3.0.14] - 2023-12-13
318
fa548cda
JB
319### Fixed
320
321- Fix possible null exception with worker_threads pools.
322
d727d871
JB
323## [3.0.13] - 2023-12-12
324
fb5a7307
JB
325### Fixed
326
327- Ensure worker choice strategy wait for worker nodes readiness.
328
329### Changed
330
331- Remove infinite retries support in worker choice strategy to avoid configuration leading to possible infinite recursion or loop.
332
90a43710
JB
333## [3.0.12] - 2023-12-12
334
9aa78bcb
JB
335### Changed
336
337- Add infinite retries support in worker choice strategy.
45a5a54c 338
d8163b08
JB
339## [3.0.11] - 2023-12-11
340
f18fd12b
JB
341### Fixed
342
457dd3dc 343- Ensure pool asynchronous resource properly track tasks execution.
f18fd12b 344
bd453998
JB
345## [3.0.10] - 2023-12-08
346
cb71d660
JB
347### Changed
348
457dd3dc 349- Add a fastpath when tasks stealing or redistribution is impossible.
cb71d660 350
d7164344
JB
351## [3.0.9] - 2023-11-26
352
78f60f82
JB
353### Fixed
354
355- Remove all pool events listener at pool destroying.
356- Remove all worker node events listener at worker node destroying.
9f99eb9b 357- Fix worker node event emitter listeners handling memory leak at pool options runtime change.
78f60f82 358
0c08a681
JB
359## [3.0.8] - 2023-11-25
360
463226a4
JB
361### Fixed
362
457dd3dc 363- Ensure continuous tasks stealing on idle start at worker node idling.
463226a4 364
14dad1fd
JB
365## [3.0.7] - 2023-11-24
366
65542a35
JB
367### Changed
368
369- Make continuous tasks stealing start at worker node idling.
370
82c5db63
JB
371## [3.0.6] - 2023-11-24
372
711623b8
JB
373### Fixed
374
b51d8596 375- Ensure pool statuses are checked at initialization, `start()` or `destroy()`.
55082af9 376- Ensure pool `ready` event can be emitted after several `start()/destroy()` cycles.
711623b8 377
5aa31a74
JB
378## [3.0.5] - 2023-10-27
379
d91689fd
JB
380### Fixed
381
55082af9 382- Ensure pool `ready` event can be emitted only once.
d91689fd 383
597775b2
JB
384## [3.0.4] - 2023-10-20
385
03fb313b
JB
386### Changed
387
49d60f11 388- Switch to Bencher for benchmarking: [https://bencher.dev/perf/poolifier](https://bencher.dev/perf/poolifier).
03fb313b
JB
389- Use builtin retry mechanism in worker choice strategies instead of custom one.
390
6c285176
JB
391## [3.0.3] - 2023-10-19
392
9761e404
JB
393### Fixed
394
395- Avoid null exception at sending message to worker.
535fd8d5 396- Avoid null exception at checking worker node readiness.
9761e404 397
358dc40f
JB
398## [3.0.2] - 2023-10-17
399
97256a85
JB
400### Fixed
401
c3c2b35e 402- Fix race condition at dynamic worker node task assignment and scheduled removal. See issue [#1468](https://github.com/poolifier/poolifier/issues/1468) and [#1496](https://github.com/poolifier/poolifier/issues/1496).
97256a85 403
7a570743
JB
404## [3.0.1] - 2023-10-16
405
dbfa7948
JB
406### Fixed
407
fc84edac 408- Workaround possible race condition at work nodes array element removal and querying. See issue [#1468](https://github.com/poolifier/poolifier/issues/1468).
dbfa7948 409
365f13e4
JB
410### Changed
411
c3c2b35e 412- Switch the worker node eventing code to `EventTarget` API.
365f13e4 413
003b3275
JB
414## [3.0.0] - 2023-10-08
415
277c49bf
JB
416### Changed
417
418- Remove Node.js 16.x.x (EOL) support.
419
3c9e911a
JB
420## [2.7.5] - 2023-10-03
421
f80125ca
JB
422### Changed
423
424- Use `EventEmitterAsyncResource` type from `@types/node` for pool event emitter. TypeScript users will need to update to latest `@types/node` version.
425
3466e757
JB
426## [2.7.4] - 2023-09-25
427
67b26ae2
JB
428### Fixed
429
430- Fix source maps (bundler issue).
431
eeb1f961
JB
432## [2.7.3] - 2023-09-24
433
b5604034
JB
434### Changed
435
436- Convert pool event emitter to event emitter async resource.
437
f2df6dc8
JB
438## [2.7.2] - 2023-09-23
439
116ca64b
JB
440### Changed
441
442- Add source maps to npm package to ease debugging.
443
1e319a70
JB
444### Added
445
446- Continuous benchmarking versus other worker pools: [https://poolifier.github.io/benchmark](https://poolifier.github.io/benchmark).
447
aab2819b
JB
448## [2.7.1] - 2023-09-20
449
ae036c3e
JB
450### Fixed
451
452- Ensure worker message listener used one time are removed after usage.
453
15d7c489
JB
454## [2.7.0] - 2023-09-19
455
160557ff
JB
456### Fixed
457
458- Fix task stealing related tasks queue options handling at runtime.
459
c3284191
JB
460### Changed
461
462- Rename `listTaskFunctions()` to `listTaskFunctionNames()` in pool and worker API.
463
464### Added
465
35808931 466- Add `hasTaskFunction()`, `addTaskFunction()`, `removeTaskFunction()`, `setDefaultTaskFunction()` methods to pool API: [PR #1148](https://github.com/poolifier/poolifier/pull/1148).
c20084b6 467- Stricter worker constructor arguments validation.
c3284191 468
04054352
JB
469## [2.6.45] - 2023-09-17
470
093af25b
JB
471### Changed
472
473- Disable publication on GitHub packages registry on release until authentication issue is fixed.
09d9af02
JB
474
475### Added
476
ce0ab2d7 477- Add `startWorkers` to pool options to whether start the minimum number of workers at pool initialization or not.
cde5b54e 478- Add `start()` method to pool API to start the minimum number of workers.
2eee7220 479- Add `taskStealing` and `tasksStealingOnBackPressure` to tasks queue options to whether enable task stealing or not and whether enable tasks stealing under back pressure or not.
1e319a70 480- Continuous internal benchmarking: [https://poolifier.github.io/benchmark-results/dev/bench](https://poolifier.github.io/benchmark-results/dev/bench).
f1c674cd 481
bce9ffdf
JB
482## [2.6.44] - 2023-09-08
483
4cb259d3
JB
484### Fixed
485
486- Use a dedicated PAT to publish on GitHub packages registry.
487
488### Added
489
490- Publish on GitHub packages registry on release.
491
492### Changed
493
494- Switch from rome to biome: [PR #1128](https://github.com/poolifier/poolifier/pull/1128).
495
fbda1e26
JB
496## [2.6.43] - 2023-09-08
497
15fc82ba
JB
498### Added
499
4cb259d3 500- Publish on GitHub packages registry on release.
15fc82ba
JB
501
502### Changed
503
4cb259d3 504- Switch from rome to biome: [PR #1128](https://github.com/poolifier/poolifier/pull/1128).
15fc82ba 505
b47306a3
JB
506## [2.6.42] - 2023-09-06
507
ad11ca81
JB
508### Changed
509
510- Optimize hot code paths implementation: avoid unnecessary branching, add and use optimized helpers (min, max), use reduce() array helper, ...
511
1b37751d
JB
512## [2.6.41] - 2023-09-03
513
f3a91bac
JB
514### Changed
515
516- Optimize worker choice strategies implementation.
517
7790a494
JB
518## [2.6.40] - 2023-09-01
519
6fe200b4
JB
520### Fixed
521
522- Do not pre-choose in WRR worker choice strategy to avoid bias.
68738842 523- Avoid array out of bound in worker choice strategies after worker node removal.
6fe200b4 524
766c7f84
JB
525## [2.6.39] - 2023-08-30
526
edf8ce4e
JB
527### Fixed
528
4cb259d3 529- Fix race condition in worker choice strategies at worker node info querying while not yet initialized.
edf8ce4e 530
904a5689
JB
531## [2.6.38] - 2023-08-30
532
b40c4b06
JB
533### Added
534
535- Bundle typescript types declaration into one file.
536
619f403b
JB
537### Changed
538
539- Improve interleaved weighted round robin worker choice strategy implementation.
540
5a24d71c
JB
541## [2.6.37] - 2023-08-28
542
bdb9d712
JB
543### Fixed
544
545- Ensure unused worker usage statistics are deleted at runtime.
546
8c0b113f
JB
547### Changed
548
549- Rename worker choice strategy options `choiceRetries` to `retries`.
574c5c8d 550- Avoid unnecessary branching in worker choice strategies.
8c0b113f 551
ba821940
JB
552## [2.6.36] - 2023-08-27
553
9d2d0da1
JB
554### Fixed
555
556- Fix pool `execute()` arguments check.
557
1f0766e7
JB
558### Changed
559
560- Make continuous tasks stealing algorithm less aggressive.
8780236f 561- Fine tune tasks stealing algorithm under back pressure.
1f0766e7 562
ffd2c1ff
JB
563## [2.6.35] - 2023-08-25
564
dc021bcc
JB
565### Fixed
566
567- Don't account worker usage statistics for tasks that have failed.
3baa0837 568- Fix pool information runtime and wait time median computation.
dc021bcc
JB
569
570### Changed
571
572- Update simple moving average implementation to use a circular buffer.
573- Update simple moving median implementation to use a circular buffer.
68cbdc84
JB
574- Account for stolen tasks in worker usage statistics and pool information.
575
576### Added
577
578- Continuous tasks stealing algorithm.
dc021bcc 579
c58bc2a1
JB
580## [2.6.34] - 2023-08-24
581
0bc68267
JB
582### Fixes
583
584- Avoid cascading tasks stealing under back pressure.
585
586### Changed
587
588- Add fastpath to queued tasks rescheduling.
589
39fb7ad0
JB
590## [2.6.33] - 2023-08-24
591
dd951876
JB
592### Fixed
593
594- Fix queued tasks rescheduling.
595
ff3f866a
JB
596### Changed
597
598- Rename tasks queue options `queueMaxSize` to `size`.
599
a6b3272b 600### Added
dd951876 601
a6b3272b 602- Task stealing scheduling algorithm if tasks queueing is enabled.
dd951876 603
c55c9b5d
JB
604## [2.6.32] - 2023-08-23
605
15b176e0
JB
606### Fixed
607
608- Ensure no task can be executed when the pool is destroyed.
609
20c6f652
JB
610### Added
611
612- Add `queueMaxSize` option to tasks queue options.
574b351d 613- Add O(1) deque implementation implemented with doubly linked list and use it for tasks queueing.
72695f86 614- Add tasks stealing algorithm when a worker node queue is back pressured if tasks queueing is enabled.
20c6f652 615
e560a9f2
JB
616## [2.6.31] - 2023-08-20
617
b1aae695
JB
618### Fixed
619
3e8611a8 620- Fix worker choice strategy retries mechanism in some edge cases.
b1aae695 621
94407def
JB
622### Changed
623
e695d66f 624- Make orthogonal worker choice strategies tasks distribution and created dynamic worker usage.
a71b05bc 625- Remove the experimental status of the `LEAST_ELU` worker choice strategy.
94407def 626
962b9863
JB
627## [2.6.30] - 2023-08-19
628
33e6bb4c
JB
629### Fixed
630
631- Ensure pool event `backPressure` is emitted.
632- Ensure pool event `full` is emitted only once.
8735b4e5 633- Ensure worker node cannot be instantiated without proper arguments.
33e6bb4c 634
8cc4ea81
JB
635## [2.6.29] - 2023-08-18
636
6169563b
JB
637### Fixed
638
55082af9 639- Fix race condition between readiness and task functions worker message handling at startup.
5dd4043c 640- Fix duplicate task function worker usage statistics computation per task function.
db0e38ee 641- Update task function worker usage statistics if and only if there's at least two different task functions.
5bb5be17 642- Fix race condition at task function worker usage executing task computation leading to negative value.
6169563b 643
8990357d
JB
644### Added
645
445264e8 646- 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).
8990357d
JB
647- Use back pressure detection in worker choice strategies.
648- Add worker choice strategies retries mechanism if no worker is eligible.
649
21157987
JB
650## [2.6.28] - 2023-08-16
651
f05ed93c
JB
652### Fixed
653
654- Ensure pool workers are properly initialized.
655
12d67776
JB
656### Added
657
658- HTTP server pool examples: express-cluster, express-hybrid.
659
d18fccb1
JB
660### Changed
661
662- Remove now useless branching in worker hot code path.
663
741cdb34
JB
664## [2.6.27] - 2023-08-15
665
50e7f498
JB
666### Fixed
667
668- Add `KillHandler` type definition to exported types.
669
ef3891a3
JB
670### Added
671
672- Add `destroy` event to pool API.
673
e9dc6efa
JB
674## [2.6.26] - 2023-08-15
675
2b099bf7
JB
676### Added
677
678- Add kill handler to worker options allowing to execute custom code when worker is killed.
ef3891a3 679- Add `listTaskFunctions()` method to pool API.
1f4553c6 680- SMTP client pool example: nodemailer.
2b099bf7 681
5b726f72
JB
682## [2.6.25] - 2023-08-13
683
72855e92
JB
684### Added
685
3b311539 686- HTTP server pool examples: fastify-cluster, fastify-hybrid.
02999424 687- WebSocket server pool examples: ws-cluster, ws-hybrid.
72855e92 688
7aadd6e5
JB
689## [2.6.24] - 2023-08-12
690
7d91a8cd
JB
691### Added
692
693- Add array of transferable objects to the `execute()` method arguments.
02999424 694- WebSocket server pool examples: ws-worker_threads.
7d91a8cd 695
6b4263b4
JB
696## [2.6.23] - 2023-08-11
697
3d76750a 698### Fixed
8e0af894 699
3d76750a 700- 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 701
3d76750a
JB
702### Added
703
704- HTTP client pool examples: fetch, node-fetch and axios with multiple task functions.
02999424 705- HTTP server pool examples: express-worker_threads, fastify-worker_threads.
3d76750a
JB
706
707## [2.6.22] - 2023-08-10
9606b474 708
3d76750a 709### Fixed
9606b474
JB
710
711- Add missing `types` field to package.json `exports`.
712
3d76750a
JB
713### Changed
714
715- Structure markdown documentation (PR #811).
716
d9647bdd
JB
717## [2.6.21] - 2023-08-03
718
2111ec12
JB
719### Changed
720
721- Improve code documentation.
722- Code refactoring and cleanup for better maintainability and readability.
723
5c30b9d9
JB
724## [2.6.20] - 2023-07-21
725
10ecf8fd
JB
726### Fixed
727
728- Fix queued tasks redistribution on error task execution starvation.
a1763c54 729- Ensure tasks queueing per worker condition is untangled from the pool busyness semantic.
10ecf8fd 730
aa9eede8
JB
731### Changed
732
7c89e6a4 733- Drastically reduce lookups by worker in the worker nodes.
aa9eede8 734
62485908
JB
735## [2.6.19] - 2023-07-20
736
2e2ef9c3
JB
737### Added
738
739- Dedicated internal communication channel for worker_threads pools.
740
8f4c9491
JB
741## [2.6.18] - 2023-07-19
742
8660b972
JB
743### Changed
744
745- Code refactoring and cleanup for better maintainability and readability. Bundle size is a bit smaller.
746
206a3519
JB
747## [2.6.17] - 2023-07-16
748
b4899fae
JB
749### Added
750
1a3e01ba 751- Add `listTaskFunctions()` method to worker API.
b4899fae 752
58a06a6c
JB
753## [2.6.16] - 2023-07-12
754
2a69b8c5
JB
755### Fixed
756
80520ca4 757- Fix pool startup detection.
2a69b8c5
JB
758- Fix worker task functions handling.
759
b5900b02
JB
760## [2.6.15] - 2023-07-11
761
19dbc45b
JB
762### Added
763
764- Take into account worker node readiness in worker choice strategies.
765
4a0db581
JB
766## [2.6.14] - 2023-07-10
767
87e44747
JB
768### Fixed
769
770- Fix task function statistics tracking.
771
0265272f
JB
772## [2.6.13] - 2023-07-10
773
968a2e8c
JB
774### Added
775
776- Add per task function statistics tracking.
782299f8 777- Add public methods to manipulate the worker task functions at runtime.
968a2e8c 778
44c8c00f
JB
779## [2.6.12] - 2023-07-09
780
aa4bf4b2
JB
781### Fixed
782
783- Workaround import issue with `node:os` module in node 16.x.x.
784
b7cfced1
JB
785## [2.6.11] - 2023-07-09
786
d5024c00
JB
787### Fixed
788
789- Fix pool readiness semantic.
790
f313a208
JB
791## [2.6.10] - 2023-07-08
792
2431bdb4
JB
793### Fixed
794
795- Ensure workers are not recreated on error at pool startup.
796
797### Added
798
799- Add `ready` and `strategy` fields to pool information.
800- 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 801- Add dynamic pool sizing checks.
2431bdb4 802
369d0a51
JB
803## [2.6.9] - 2023-07-07
804
2845f2a5
JB
805### Fixed
806
807- Recreate the right worker type on uncaught exception.
808
809### Added
810
811- Add minimum and maximum to internal measurement statistics.
1dcf8b7b 812- Add `runTime` and `waitTime` to pool information.
75d3401a 813- Check worker inactive time only on dynamic worker.
2845f2a5 814
fc97d613
JB
815## [2.6.8] - 2023-07-03
816
92b1feaa
JB
817### Fixed
818
819- Brown paper bag release to fix version handling in pool information.
820
52d54060
JB
821## [2.6.7] - 2023-07-03
822
5bc91f3e
JB
823### Fixed
824
825- Ensure worker queued tasks at error are reassigned to other pool workers.
826
afe0d5bf
JB
827### Added
828
829- Add pool `utilization` ratio to pool information.
23ccf9d7 830- Add `version` to pool information.
e5b3047d 831- Add worker information to worker nodes.
afe0d5bf 832
f42c583f
JB
833## [2.6.6] - 2023-07-01
834
6961ca9a
JB
835### Added
836
d5e3c4ff 837- Add safe helper `availableParallelism()` to help sizing the pool.
6961ca9a 838
3749facb
JB
839### Fixed
840
841- Ensure message handler is only registered in worker.
842
6fed2513
JB
843## [2.6.5] - 2023-06-27
844
c72f6987
JB
845### Known issues
846
70726c28 847- Cluster pools tasks execution are not working by using ESM files extension: https://github.com/poolifier/poolifier/issues/782
c72f6987
JB
848
849### Fixed
850
851- Artificial version bump to 2.6.5 to workaround publication issue.
d5e3c4ff 852- Ensure cluster pool `destroy()` gracefully shutdowns worker's server.
c72f6987
JB
853- Ensure pool event is emitted before task error promise rejection.
854- Fix queued tasks count computation.
855
856### Removed
857
2fbe1783 858- Remove unneeded worker_threads worker `MessageChannel` internal usage for IPC.
c72f6987 859
6426631b
JB
860## [2.6.4] - 2023-06-27
861
941f9a7c
JB
862### Known issues
863
70726c28 864- Cluster pools tasks execution are not working by using ESM files extension: https://github.com/poolifier/poolifier/issues/782
941f9a7c 865
2c039e43
JB
866### Fixed
867
d5e3c4ff 868- Ensure cluster pool `destroy()` gracefully shutdowns worker's server.
2c039e43 869- Ensure pool event is emitted before task error promise rejection.
9c16fb4b 870- Fix queued tasks count computation.
2c039e43 871
941f9a7c
JB
872### Removed
873
2fbe1783 874- Remove unneeded worker_threads worker `MessageChannel` internal usage for IPC.
941f9a7c 875
bc1b0765
JB
876## [2.6.3] - 2023-06-19
877
a6a2dc4c
JB
878### Fixed
879
880- Ensure no tasks are queued when trying to soft kill a dynamic worker.
f0d7f803 881- Update strategies internals after statistics computation.
a6a2dc4c 882
7b56f532
JB
883### Changed
884
885- Optimize O(1) queue implementation.
886
b628596c
JB
887## [2.6.2] - 2023-06-12
888
a9e89d00
JB
889### Fixed
890
891- Fix new worker use after creation in dynamic pool given the current worker choice strategy.
892
4368a898
JB
893## [2.6.1] - 2023-06-10
894
931d43e2
JB
895### Added
896
13ab5b87 897- Add worker choice strategy documentation: [README.md](./docs/worker-choice-strategies.md).
931d43e2 898
f1c06930
JB
899### Fixed
900
901- Fix average statistics computation: ensure failed tasks are not accounted.
902
16671b07
JB
903## [2.6.0] - 2023-06-09
904
a1347286
JB
905### Added
906
5af9c0f7 907- Add `LEAST_ELU` worker choice strategy (experimental).
9adcefab 908- Add tasks ELU instead of runtime support to `FAIR_SHARE` worker choice strategy.
a1347286 909
1c6fe997
JB
910### Changed
911
912- Refactor pool worker node usage internals.
477f48e7 913- Breaking change: refactor worker choice strategy statistics requirements: the syntax of the worker choice strategy options has changed.
f63a9dda 914- Breaking change: pool information `info` property object fields have been renamed.
1c6fe997
JB
915
916### Fixed
917
918- Fix wait time accounting.
919- Ensure worker choice strategy `LEAST_BUSY` accounts also tasks wait time.
920- Ensure worker choice strategy `LEAST_USED` accounts also queued tasks.
921
aa07d6ee
JB
922## [2.5.4] - 2023-06-07
923
b6b32453
JB
924### Added
925
926- Add Event Loop Utilization (ELU) statistics to worker tasks usage.
927
928### Changed
929
930- Compute statistics at the worker level only if needed.
2fbe1783 931- Add `worker_threads` options to thread pool options.
b6b32453 932
272d4d8f
JB
933### Fixed
934
935- Make the `LEAST_BUSY` strategy only relies on task runtime.
936
ed47fb3d
JB
937## [2.5.3] - 2023-06-04
938
89a4abfd
JB
939### Changed
940
941- Refine pool information content.
b4213b7f 942- Limit pool internals public exposure.
89a4abfd 943
8a9febf5
JB
944## [2.5.2] - 2023-06-02
945
91ee39ed
JB
946### Added
947
948- Add `taskError` pool event for task execution error.
6b27d407 949- Add pool information `info` property to pool.
91ee39ed
JB
950- Emit pool information on `busy` and `full` pool events.
951
8babb151
JB
952## [2.5.1] - 2023-06-01
953
0e05c4dc
JB
954### Added
955
1f68cede 956- Add pool option `restartWorkerOnError` to restart worker on uncaught error. Default to `true`.
91ee39ed 957- Add `error` pool event for uncaught worker error.
0e05c4dc 958
a8766181
JB
959## [2.5.0] - 2023-05-31
960
e4543b14
JB
961### Added
962
963- Switch pool event emitter to `EventEmitterAsyncResource`.
6da80d38 964- Add tasks wait time accounting in per worker tasks usage.
5af9c0f7 965- Add interleaved weighted round robin `INTERLEAVED_WEIGHTED_ROUND_ROBIN` worker choice strategy (experimental).
e4543b14
JB
966
967### Changed
968
969- Renamed worker choice strategy `LESS_BUSY` to `LEAST_BUSY` and `LESS_USED` to `LEAST_USED`.
970
570efb11
JB
971## [2.4.14] - 2023-05-09
972
b0f28bad
JB
973### Fixed
974
975- Ensure no undefined task runtime can land in the tasks history.
976- Fix median computation implementation once again.
977
110b6d13
JB
978### Added
979
980- Unit tests for median and queue implementations.
981
72584880
JB
982## [2.4.13] - 2023-05-08
983
b0d6ed8f
JB
984### Fixed
985
e3058615 986- Fix worker choice strategy options validation.
b0d6ed8f
JB
987- Fix fair share worker choice strategy internals update: ensure virtual task end timestamp is computed at task submission.
988
06140c32
JB
989## [2.4.12] - 2023-05-06
990
a86b6df1
JB
991### Added
992
993- Support multiple task functions per worker.
08f3f44c 994- Add custom worker weights support to worker choice strategies options.
a86b6df1 995
29ee7e9a
JB
996### Changed
997
998- Use O(1) queue implementation for tasks queueing.
999
0682ba15
JB
1000### Fixed
1001
1002- Fix median computation implementation.
1003- Fix fair share worker choice strategy internals update.
1004
936d53ec
JB
1005## [2.4.11] - 2023-04-23
1006
cb70b19d
JB
1007### Changed
1008
1009- Optimize free worker finding in worker choice strategies.
1010
15bb637a
JB
1011## [2.4.10] - 2023-04-15
1012
ef41a6e6
JB
1013### Fixed
1014
82ea6492 1015- Fix typescript type definition for task function: ensure the input data is optional.
ef41a6e6
JB
1016- Fix typescript type definition for pool execute(): ensure the input data is optional.
1017
181eb2b4
JB
1018## [2.4.9] - 2023-04-15
1019
a20f0ba5
JB
1020### Added
1021
1022- Add tasks queue enablement runtime setter to pool.
1023- Add tasks queue options runtime setter to pool.
1024- Add worker choice strategy options runtime setter to pool.
1025
1026### Changed
1027
1028- Remove the tasks queuing experimental status.
1029
d4aeae5a
JB
1030### Fixed
1031
82ea6492 1032- Fix task function type definition and validation.
2fc5cae3 1033- Fix worker choice strategy options handling.
d4aeae5a 1034
1d9e7023
JB
1035## [2.4.8] - 2023-04-12
1036
f9b4bbf8
JB
1037### Fixed
1038
1039- Fix message between main worker and worker type definition for tasks.
1040- Fix code documentation.
1041
12ae3210
JB
1042## [2.4.7] - 2023-04-11
1043
7171d33f
JB
1044### Added
1045
1046- Add worker tasks queue options to pool options.
1047
e8bd29ce
JB
1048### Fixed
1049
1050- Fix missing documentation.
1051
42c7bc10
JB
1052## [2.4.6] - 2023-04-10
1053
681196cc
JB
1054### Fixed
1055
1056- Ensure one task at a time is executed per worker with tasks queueing enabled.
1c6fe997 1057- Properly count worker executing tasks with tasks queueing enabled.
681196cc 1058
54d360e3
JB
1059## [2.4.5] - 2023-04-09
1060
3fafb1b2
JB
1061### Added
1062
9e775f96
JB
1063- Use monotonic high resolution timer for worker tasks runtime.
1064- Add worker tasks median runtime to statistics.
ff733df7 1065- Add worker tasks queue (experimental).
3fafb1b2 1066
92fa3eb6
JB
1067## [2.4.4] - 2023-04-07
1068
aee46736
JB
1069### Added
1070
1071- Add `PoolEvents` enumeration and `PoolEvent` type.
1072
36b5e78f
JB
1073### Fixed
1074
ff0c2b3e 1075- Destroy worker only on alive check.
36b5e78f 1076
9fb0f324
JB
1077## [2.4.3] - 2023-04-07
1078
28cf3617
JB
1079### Fixed
1080
1081- Fix typedoc generation with inheritance.
1082
848f0f27
JB
1083## [2.4.2] - 2023-04-06
1084
164d950a
JB
1085### Added
1086
1087- Add `full` event to dynamic pool.
32417142 1088- Keep worker choice strategy in memory for conditional reuse.
164d950a 1089
78ab2555
JB
1090### Fixed
1091
1092- Fix possible negative worker key at worker removal in worker choice strategies.
1093
79aafe9f
JB
1094## [2.4.1] - 2023-04-05
1095
9cd39dd4
JB
1096### Changed
1097
1098- Optimize worker choice strategy for dynamic pool.
1099
965415bb
JB
1100### Fixed
1101
1102- Ensure dynamic pool does not alter worker choice strategy expected behavior.
1103
d8b60b1c
JB
1104## [2.4.0] - 2023-04-04
1105
c6bd2650
JB
1106### Added
1107
1108- Add `LESS_BUSY` worker choice strategy.
1109
1110### Changed
1111
1112- Optimize worker storage in pool.
1113- Optimize worker alive status check.
1114- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
1115- Optimize `LESS_USED` worker choice strategy.
2a87030e 1116- Update benchmark versus external threads pools.
c6bd2650
JB
1117- Optimize tasks usage statistics requirements for worker choice strategy.
1118
1119### Fixed
1120
1121- Ensure trimmable characters are checked at pool initialization.
1122- Fix message id integer overflow.
1123- Fix pool worker removal in worker choice strategy internals.
1124- Fix package publication with pnpm.
1125
d0a3f018
JB
1126## [2.4.0-3] - 2023-04-04
1127
b2ede285
JB
1128### Added
1129
1130- Add `LESS_BUSY` worker choice strategy.
1131
1132### Changed
1133
1134- Optimize worker storage in pool.
1135- Optimize worker alive status check.
1136- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
1137- Optimize `LESS_USED` worker choice strategy.
2a87030e 1138- Update benchmark versus external threads pools.
b2ede285
JB
1139
1140### Fixed
1141
1142- Ensure trimmable characters are checked at pool initialization.
1143- Fix message id integer overflow.
1144- Fix pool worker removal in worker choice strategy internals.
1145- Fix package publication with pnpm.
1146
a015ea40
JB
1147## [2.4.0-2] - 2023-04-03
1148
698f4bbc
JB
1149### Added
1150
1151- Add `LESS_BUSY` worker choice strategy.
1152
1153### Changed
1154
1155- Optimize worker storage in pool.
1156- Optimize worker alive status check.
1157- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
1158- Optimize `LESS_USED` worker choice strategy.
1159
1160### Fixed
1161
1162- Ensure trimmable characters are checked at pool initialization.
1163- Fix message id integer overflow.
1164- Fix pool worker removal in worker choice strategy internals.
1165- Fix package publication with pnpm.
1166
8fe15920
JB
1167## [2.4.0-1] - 2023-04-03
1168
5b301c28
JB
1169### Added
1170
1171- Add `LESS_BUSY` worker choice strategy.
1172
1173### Changed
1174
1175- Optimize worker storage in pool.
1176- Optimize worker alive status check.
1177- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
1178- Optimize `LESS_USED` worker choice strategy.
1179
1180### Fixed
1181
1182- Ensure trimmable characters are checked at pool initialization.
1183- Fix message id integer overflow.
1184- Fix pool worker removal in worker choice strategy internals.
1185
2fb9ca9c
JB
1186## [2.4.0-0] - 2023-04-03
1187
168c526f
JB
1188### Added
1189
1190- Add `LESS_BUSY` worker choice strategy.
1191
1d71a908
JB
1192### Changed
1193
ffcbbad8 1194- Optimize worker storage in pool.
1d71a908 1195- Optimize worker alive status check.
65a60b3b 1196- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
737c6d97 1197- Optimize `LESS_USED` worker choice strategy.
1d71a908 1198
ffcbbad8
JB
1199### Fixed
1200
1201- Ensure trimmable characters are checked at pool initialization.
b4e75778 1202- Fix message id integer overflow.
97a2abc3 1203- Fix pool worker removal in worker choice strategy internals.
ffcbbad8 1204
08372738
JB
1205## [2.3.10] - 2023-03-18
1206
710826bc
JB
1207### Fixed
1208
9606b474 1209- Fix package.json `exports` syntax for ESM and CommonJS.
710826bc
JB
1210
1211### Changed
1212
1213- Permit SemVer pre-release publication.
76e5ac6f 1214
e4796ecd
JB
1215## [2.3.10-2] - 2023-03-18
1216
6abad580
JB
1217### Fixed
1218
9606b474 1219- Fix package.json `exports` syntax for ESM and CommonJS.
6abad580 1220
a2ee98cc
JB
1221## [2.3.10-1] - 2023-03-18
1222
7e060cee
JB
1223### Changed
1224
90483887 1225- Permit SemVer pre-release publication.
7e060cee 1226
c81bfafb
JB
1227## [2.3.10-0] - 2023-03-18
1228
fe18768d
JB
1229### Fixed
1230
9606b474 1231- Fix package.json `exports` syntax for ESM and CommonJS.
fe18768d 1232
d7b78217
JB
1233## [2.3.9] - 2023-03-18
1234
ed6dd37f
JB
1235### Changed
1236
1237- Introduce ESM module support along with CommonJS one.
1238
1239### Fixed
1240
1241- Fix brown paper bag bug referencing the same object literal.
1242
68e2ad86
JB
1243## [2.3.8] - 2023-03-18
1244
ca6c7d70
JB
1245### Changed
1246
1247- Switch internal benchmarking code to benny.
fbdedeb9
JB
1248- Switch to TypeScript 5.x.x.
1249- Switch rollup bundler plugins to core ones.
ed6dd37f 1250- Switch to TSDoc syntax.
fbdedeb9 1251- Enforce conventional commits.
ca6c7d70 1252
d15211d4
JB
1253### Fixed
1254
1255- Fix random integer generator.
fbdedeb9 1256- Fix worker choice strategy pool type identification at initialization.
d15211d4 1257
995705ea
JB
1258## [2.3.7] - 2022-10-23
1259
b953022b
JB
1260### Changed
1261
1262- Switch to open collective FOSS project funding platform.
78cea37e
JB
1263- Switch to ts-standard linter configuration on TypeScript code.
1264
1265### Fixed
1266
1267- Fixed missing async on pool execute method.
1268- Fixed typing in TypeScript example.
1269- Fixed types in unit tests.
b953022b 1270
3b9f6953
JB
1271## [2.3.6] - 2022-10-22
1272
f80cead4
JB
1273### Changed
1274
1275- Cleanup pool attributes and methods.
1276- Refine error types thrown.
1277
1278### Fixed
1279
1280- Fix continuous integration build on windows.
1281- Fix code coverage reporting by using c8 instead of nyc.
1282
efc22107
JB
1283## [2.3.5] - 2022-10-21
1284
7a6a0a96
JB
1285### Changed
1286
a05c10de
JB
1287- Improve benchmarks: add IO intensive task workload, add task size option, integrate code into linter.
1288- Optimize tasks usage lookup implementation.
7a6a0a96 1289
b4904890
JB
1290### Fixed
1291
1292- Fix missed pool event emitter type export.
1293- Fix typedoc documentation generation.
1294
a875f8d1
JB
1295## [2.3.4] - 2022-10-17
1296
73cda448
JB
1297### Added
1298
1299- Fully automate release process with release-it.
1300
45a5a54c
JB
1301### Changed
1302
73cda448 1303- Optimize fair share task scheduling algorithm implementation.
2a87030e 1304- Update benchmark versus external pools results with latest version.
45a5a54c 1305
90ee1b18 1306## [2.3.3] - 2022-10-15
1a76932b
JB
1307
1308### Added
1309
1310- Add support for [cluster settings](https://nodejs.org/api/cluster.html#cluster_cluster_settings) in cluster pool options.
1311
90ee1b18 1312## [2.3.2] - 2022-10-14
11df3590
JB
1313
1314### Changed
1315
1316- Optimize fair share worker selection strategy implementation.
1317
1318### Fixed
1319
1320- Fix WRR worker selection strategy: ensure the condition triggering the round robin can be fulfilled.
1321
90ee1b18 1322## [2.3.1] - 2022-10-13
23ff945a
JB
1323
1324### Added
1325
1326- Pool worker choice strategies:
1327 - `WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN` strategy based on weighted round robin scheduling algorithm using tasks execution time for now.
1328 - `WorkerChoiceStrategies.FAIR_SHARE` strategy based on fair share scheduling algorithm using tasks execution time for now.
1329
90ee1b18 1330## [2.2.2] - 2022-10-09
cb2b6c69
JB
1331
1332### Fixed
1333
1334- Fixed `README.md` file.
1335
90ee1b18 1336## [2.2.1] - 2022-10-08
bdacc2d2 1337
bdaf31cd
JB
1338### Added
1339
1340- Dynamic worker choice strategy change at runtime.
bdacc2d2 1341
90ee1b18 1342## [2.2.0] - 2022-01-05
7e0d447f
JB
1343
1344### Breaking Changes
1345
9606b474 1346- Support only Node.js version 16.x.x for cluster pool: upstream cluster API have changed on that version.
7e0d447f 1347
90ee1b18 1348## [2.1.0] - 2021-08-29
35cf1c03
JB
1349
1350### Added
1351
1352- Add an optional pool option `messageHandler` to `PoolOptions<Worker>` for registering a message handler callback on each worker.
e088a00c
JB
1353
1354### Breaking Changes
1355
1356- `AbstractWorker` class `maxInactiveTime`, `killBehavior` and `async` attributes have been removed in favour of the same ones in the worker options `opts` public attribute.
1357- `AbstractWorker` class `lastTask` attribute have been renamed to `lastTaskTimestamp`.
1358- `AbstractWorker` class `interval` attribute have been renamed to `aliveInterval`.
c365b2d3 1359- `AbstractWorker` class cannot be instantiated without specifying the `mainWorker` argument referencing the main worker.
e088a00c 1360
90ee1b18 1361## [2.0.2] - 2021-05-12
14916bf9
JB
1362
1363### Bug fixes
1364
1365- Fix `busy` event emission on fixed pool type
1366
90ee1b18 1367## [2.0.1] - 2021-03-16
7f685093
JB
1368
1369### Bug fixes
1370
1371- Check if pool options are properly set.
1372- `busy` event is emitted on all pool types.
1373
90ee1b18 1374## [2.0.0] - 2021-03-01
fa0f5b28 1375
f3f833ab 1376### Bug fixes
d63d3be3 1377
ddbeaffd 1378- Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
d63d3be3 1379
fa0f5b28
S
1380### Breaking Changes
1381
7f685093 1382- `FullPool` event is now renamed to `busy`.
1927ee67 1383- `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
1a81f8af 1384 _Find more details on our JSDoc._
ddbeaffd 1385
1927ee67
APA
1386- `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed.
1387
ddbeaffd 1388- We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
fa0f5b28 1389
ec2ccfc8
JB
1390### Pool options types declaration merge
1391
1392`FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
1393
fa0f5b28
S
1394#### New `export` strategy
1395
1396```js
1397// Before
0eee77cb 1398const DynamicThreadPool = require('poolifier/lib/dynamic')
fa0f5b28 1399// After
0eee77cb 1400const { DynamicThreadPool } = require('poolifier/lib/dynamic')
fa0f5b28
S
1401```
1402
1403But you should always prefer just using
1404
1405```js
0eee77cb 1406const { DynamicThreadPool } = require('poolifier')
fa0f5b28
S
1407```
1408
d3c8a1a8
S
1409#### New type definitions for input data and response
1410
6677a3d3 1411For cluster worker and worker-thread pools, you can now only send and receive structured-cloneable data.
9606b474 1412_This is not a limitation by poolifier but Node.js._
d3c8a1a8 1413
3a4b605f 1414#### Public property replacements
5c5a1fb7 1415
3a4b605f 1416`numWorkers` property is now `numberOfWorkers`
5c5a1fb7 1417
280c2a77 1418#### Internal (protected) properties and methods renaming
fa0f5b28 1419
280c2a77
S
1420These properties are not intended for end users
1421
1422- `id` => `nextMessageId`
1423
1424These methods are not intended for end users
fa0f5b28
S
1425
1426- `_chooseWorker` => `chooseWorker`
280c2a77 1427- `_newWorker` => `createWorker`
fa0f5b28
S
1428- `_execute` => `internalExecute`
1429- `_chooseWorker` => `chooseWorker`
1430- `_checkAlive` => `checkAlive`
1431- `_run` => `run`
1432- `_runAsync` => `runAsync`
1433
90ee1b18 1434## [1.1.0] - 2020-05-21
0312f71a
APA
1435
1436### Added
1437
1438- ThreadWorker support async functions as option
cf9aa6c3 1439- Various external library patches
0312f71a 1440
90ee1b18 1441## [1.0.0] - 2020-01-24
522eea03 1442
1443### Added
1444
1445- FixedThreadPool implementation
1446- DynamicThreadPool implementation
0312f71a 1447- WorkerThread implementation to improve developer experience