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