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