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