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