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