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