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