3 All notable changes to this project will be documented in this file.
5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
12 - Workaround possible race condition at work nodes array element removal and querying. See [issue #1468](https://github.com/poolifier/poolifier/issues/1468).
16 - Switch the worker node eventing code to `EventTarget` API .
18 ## [3.0.0] - 2023-10-08
22 - Remove Node.js 16.x.x (EOL) support.
24 ## [2.7.5] - 2023-10-03
28 - Use `EventEmitterAsyncResource` type from `@types/node` for pool event emitter. TypeScript users will need to update to latest `@types/node` version.
30 ## [2.7.4] - 2023-09-25
34 - Fix source maps (bundler issue).
36 ## [2.7.3] - 2023-09-24
40 - Convert pool event emitter to event emitter async resource.
42 ## [2.7.2] - 2023-09-23
46 - Add source maps to npm package to ease debugging.
50 - Continuous benchmarking versus other worker pools: [https://poolifier.github.io/benchmark](https://poolifier.github.io/benchmark).
52 ## [2.7.1] - 2023-09-20
56 - Ensure worker message listener used one time are removed after usage.
58 ## [2.7.0] - 2023-09-19
62 - Fix task stealing related tasks queue options handling at runtime.
66 - Rename `listTaskFunctions()` to `listTaskFunctionNames()` in pool and worker API.
70 - Add `hasTaskFunction()`, `addTaskFunction()`, `removeTaskFunction()`, `setDefaultTaskFunction()` methods to pool API: [PR #1148](https://github.com/poolifier/poolifier/pull/1148).
71 - Stricter worker constructor arguments validation.
73 ## [2.6.45] - 2023-09-17
77 - Disable publication on GitHub packages registry on release until authentication issue is fixed.
81 - Add `startWorkers` to pool options to whether start the minimum number of workers at pool initialization or not.
82 - Add `start()` method to pool API to start the minimum number of workers.
83 - Add `taskStealing` and `tasksStealingOnPressure` to tasks queue options to whether enable task stealing or not and whether enable tasks stealing under back pressure or not.
84 - Continuous internal benchmarking: [https://poolifier.github.io/benchmark-results/dev/bench](https://poolifier.github.io/benchmark-results/dev/bench).
86 ## [2.6.44] - 2023-09-08
90 - Use a dedicated PAT to publish on GitHub packages registry.
94 - Publish on GitHub packages registry on release.
98 - Switch from rome to biome: [PR #1128](https://github.com/poolifier/poolifier/pull/1128).
100 ## [2.6.43] - 2023-09-08
104 - Publish on GitHub packages registry on release.
108 - Switch from rome to biome: [PR #1128](https://github.com/poolifier/poolifier/pull/1128).
110 ## [2.6.42] - 2023-09-06
114 - Optimize hot code paths implementation: avoid unnecessary branching, add and use optimized helpers (min, max), use reduce() array helper, ...
116 ## [2.6.41] - 2023-09-03
120 - Optimize worker choice strategies implementation.
122 ## [2.6.40] - 2023-09-01
126 - Do not pre-choose in WRR worker choice strategy to avoid bias.
127 - Avoid array out of bound in worker choice strategies after worker node removal.
129 ## [2.6.39] - 2023-08-30
133 - Fix race condition in worker choice strategies at worker node info querying while not yet initialized.
135 ## [2.6.38] - 2023-08-30
139 - Bundle typescript types declaration into one file.
143 - Improve interleaved weighted round robin worker choice strategy implementation.
145 ## [2.6.37] - 2023-08-28
149 - Ensure unused worker usage statistics are deleted at runtime.
153 - Rename worker choice strategy options `choiceRetries` to `retries`.
154 - Avoid unnecessary branching in worker choice strategies.
156 ## [2.6.36] - 2023-08-27
160 - Fix pool `execute()` arguments check.
164 - Make continuous tasks stealing algorithm less aggressive.
165 - Fine tune tasks stealing algorithm under back pressure.
167 ## [2.6.35] - 2023-08-25
171 - Don't account worker usage statistics for tasks that have failed.
172 - Fix pool information runtime and wait time median computation.
176 - Update simple moving average implementation to use a circular buffer.
177 - Update simple moving median implementation to use a circular buffer.
178 - Account for stolen tasks in worker usage statistics and pool information.
182 - Continuous tasks stealing algorithm.
184 ## [2.6.34] - 2023-08-24
188 - Avoid cascading tasks stealing under back pressure.
192 - Add fastpath to queued tasks rescheduling.
194 ## [2.6.33] - 2023-08-24
198 - Fix queued tasks rescheduling.
202 - Rename tasks queue options `queueMaxSize` to `size`.
206 - Task stealing scheduling algorithm if tasks queueing is enabled.
208 ## [2.6.32] - 2023-08-23
212 - Ensure no task can be executed when the pool is destroyed.
216 - Add `queueMaxSize` option to tasks queue options.
217 - Add O(1) deque implementation implemented with doubly linked list and use it for tasks queueing.
218 - Add tasks stealing algorithm when a worker node queue is back pressured if tasks queueing is enabled.
220 ## [2.6.31] - 2023-08-20
224 - Fix worker choice strategy retries mechanism in some edge cases.
228 - Make orthogonal worker choice strategies tasks distribution and created dynamic worker usage.
229 - Remove the experimental status of the `LEAST_ELU` worker choice strategy.
231 ## [2.6.30] - 2023-08-19
235 - Ensure pool event `backPressure` is emitted.
236 - Ensure pool event `full` is emitted only once.
237 - Ensure worker node cannot be instantiated without proper arguments.
239 ## [2.6.29] - 2023-08-18
243 - Fix race condition between ready and task functions worker message handling at startup.
244 - Fix duplicate task function worker usage statistics computation per task function.
245 - Update task function worker usage statistics if and only if there's at least two different task functions.
246 - Fix race condition at task function worker usage executing task computation leading to negative value.
250 - Add back pressure detection on the worker node queue. Event `backPressure` is emitted when all worker node queues are full (worker node queue size >= poolMaxSize^2).
251 - Use back pressure detection in worker choice strategies.
252 - Add worker choice strategies retries mechanism if no worker is eligible.
254 ## [2.6.28] - 2023-08-16
258 - Ensure pool workers are properly initialized.
262 - HTTP server pool examples: express-cluster, express-hybrid.
266 - Remove now useless branching in worker hot code path.
268 ## [2.6.27] - 2023-08-15
272 - Add `KillHandler` type definition to exported types.
276 - Add `destroy` event to pool API.
278 ## [2.6.26] - 2023-08-15
282 - Add kill handler to worker options allowing to execute custom code when worker is killed.
283 - Add `listTaskFunctions()` method to pool API.
284 - SMTP client pool example: nodemailer.
286 ## [2.6.25] - 2023-08-13
290 - HTTP server pool examples: fastify-cluster, fastify-hybrid.
291 - WebSocket server pool examples: ws-cluster, ws-hybrid.
293 ## [2.6.24] - 2023-08-12
297 - Add array of transferable objects to the `execute()` method arguments.
298 - WebSocket server pool examples: ws-worker_threads.
300 ## [2.6.23] - 2023-08-11
304 - 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.
308 - HTTP client pool examples: fetch, node-fetch and axios with multiple task functions.
309 - HTTP server pool examples: express-worker_threads, fastify-worker_threads.
311 ## [2.6.22] - 2023-08-10
315 - Add missing `types` field to package.json `exports`.
319 - Structure markdown documentation (PR #811).
321 ## [2.6.21] - 2023-08-03
325 - Improve code documentation.
326 - Code refactoring and cleanup for better maintainability and readability.
328 ## [2.6.20] - 2023-07-21
332 - Fix queued tasks redistribution on error task execution starvation.
333 - Ensure tasks queueing per worker condition is untangled from the pool busyness semantic.
337 - Drastically reduce lookups by worker in the worker nodes.
339 ## [2.6.19] - 2023-07-20
343 - Dedicated internal communication channel for worker_threads pools.
345 ## [2.6.18] - 2023-07-19
349 - Code refactoring and cleanup for better maintainability and readability. Bundle size is a bit smaller.
351 ## [2.6.17] - 2023-07-16
355 - Add `listTaskFunctions()` method to worker API.
357 ## [2.6.16] - 2023-07-12
361 - Fix pool startup detection.
362 - Fix worker task functions handling.
364 ## [2.6.15] - 2023-07-11
368 - Take into account worker node readiness in worker choice strategies.
370 ## [2.6.14] - 2023-07-10
374 - Fix task function statistics tracking.
376 ## [2.6.13] - 2023-07-10
380 - Add per task function statistics tracking.
381 - Add public methods to manipulate the worker task functions at runtime.
383 ## [2.6.12] - 2023-07-09
387 - Workaround import issue with `node:os` module in node 16.x.x.
389 ## [2.6.11] - 2023-07-09
393 - Fix pool readiness semantic.
395 ## [2.6.10] - 2023-07-08
399 - Ensure workers are not recreated on error at pool startup.
403 - Add `ready` and `strategy` fields to pool information.
404 - Add pool event `ready` to notify when the number of workers created in the pool has reached the maximum size expected and are ready.
405 - Add dynamic pool sizing checks.
407 ## [2.6.9] - 2023-07-07
411 - Recreate the right worker type on uncaught exception.
415 - Add minimum and maximum to internal measurement statistics.
416 - Add `runTime` and `waitTime` to pool information.
417 - Check worker inactive time only on dynamic worker.
419 ## [2.6.8] - 2023-07-03
423 - Brown paper bag release to fix version handling in pool information.
425 ## [2.6.7] - 2023-07-03
429 - Ensure worker queued tasks at error are reassigned to other pool workers.
433 - Add pool `utilization` ratio to pool information.
434 - Add `version` to pool information.
435 - Add worker information to worker nodes.
437 ## [2.6.6] - 2023-07-01
441 - Add safe helper `availableParallelism()` to help sizing the pool.
445 - Ensure message handler is only registered in worker.
447 ## [2.6.5] - 2023-06-27
451 - Cluster pools tasks execution are not working by using ESM files extension: https://github.com/poolifier/poolifier/issues/782
455 - Artificial version bump to 2.6.5 to workaround publication issue.
456 - Ensure cluster pool `destroy()` gracefully shutdowns worker's server.
457 - Ensure pool event is emitted before task error promise rejection.
458 - Fix queued tasks count computation.
462 - Remove unneeded worker_threads worker `MessageChannel` internal usage for IPC.
464 ## [2.6.4] - 2023-06-27
468 - Cluster pools tasks execution are not working by using ESM files extension: https://github.com/poolifier/poolifier/issues/782
472 - Ensure cluster pool `destroy()` gracefully shutdowns worker's server.
473 - Ensure pool event is emitted before task error promise rejection.
474 - Fix queued tasks count computation.
478 - Remove unneeded worker_threads worker `MessageChannel` internal usage for IPC.
480 ## [2.6.3] - 2023-06-19
484 - Ensure no tasks are queued when trying to soft kill a dynamic worker.
485 - Update strategies internals after statistics computation.
489 - Optimize O(1) queue implementation.
491 ## [2.6.2] - 2023-06-12
495 - Fix new worker use after creation in dynamic pool given the current worker choice strategy.
497 ## [2.6.1] - 2023-06-10
501 - Add worker choice strategy documentation: [README.md](./docs/worker-choice-strategies.md).
505 - Fix average statistics computation: ensure failed tasks are not accounted.
507 ## [2.6.0] - 2023-06-09
511 - Add `LEAST_ELU` worker choice strategy (experimental).
512 - Add tasks ELU instead of runtime support to `FAIR_SHARE` worker choice strategy.
516 - Refactor pool worker node usage internals.
517 - Breaking change: refactor worker choice strategy statistics requirements: the syntax of the worker choice strategy options has changed.
518 - Breaking change: pool information `info` property object fields have been renamed.
522 - Fix wait time accounting.
523 - Ensure worker choice strategy `LEAST_BUSY` accounts also tasks wait time.
524 - Ensure worker choice strategy `LEAST_USED` accounts also queued tasks.
526 ## [2.5.4] - 2023-06-07
530 - Add Event Loop Utilization (ELU) statistics to worker tasks usage.
534 - Compute statistics at the worker level only if needed.
535 - Add `worker_threads` options to thread pool options.
539 - Make the `LEAST_BUSY` strategy only relies on task runtime.
541 ## [2.5.3] - 2023-06-04
545 - Refine pool information content.
546 - Limit pool internals public exposure.
548 ## [2.5.2] - 2023-06-02
552 - Add `taskError` pool event for task execution error.
553 - Add pool information `info` property to pool.
554 - Emit pool information on `busy` and `full` pool events.
556 ## [2.5.1] - 2023-06-01
560 - Add pool option `restartWorkerOnError` to restart worker on uncaught error. Default to `true`.
561 - Add `error` pool event for uncaught worker error.
563 ## [2.5.0] - 2023-05-31
567 - Switch pool event emitter to `EventEmitterAsyncResource`.
568 - Add tasks wait time accounting in per worker tasks usage.
569 - Add interleaved weighted round robin `INTERLEAVED_WEIGHTED_ROUND_ROBIN` worker choice strategy (experimental).
573 - Renamed worker choice strategy `LESS_BUSY` to `LEAST_BUSY` and `LESS_USED` to `LEAST_USED`.
575 ## [2.4.14] - 2023-05-09
579 - Ensure no undefined task runtime can land in the tasks history.
580 - Fix median computation implementation once again.
584 - Unit tests for median and queue implementations.
586 ## [2.4.13] - 2023-05-08
590 - Fix worker choice strategy options validation.
591 - Fix fair share worker choice strategy internals update: ensure virtual task end timestamp is computed at task submission.
593 ## [2.4.12] - 2023-05-06
597 - Support multiple task functions per worker.
598 - Add custom worker weights support to worker choice strategies options.
602 - Use O(1) queue implementation for tasks queueing.
606 - Fix median computation implementation.
607 - Fix fair share worker choice strategy internals update.
609 ## [2.4.11] - 2023-04-23
613 - Optimize free worker finding in worker choice strategies.
615 ## [2.4.10] - 2023-04-15
619 - Fix typescript type definition for task function: ensure the input data is optional.
620 - Fix typescript type definition for pool execute(): ensure the input data is optional.
622 ## [2.4.9] - 2023-04-15
626 - Add tasks queue enablement runtime setter to pool.
627 - Add tasks queue options runtime setter to pool.
628 - Add worker choice strategy options runtime setter to pool.
632 - Remove the tasks queuing experimental status.
636 - Fix task function type definition and validation.
637 - Fix worker choice strategy options handling.
639 ## [2.4.8] - 2023-04-12
643 - Fix message between main worker and worker type definition for tasks.
644 - Fix code documentation.
646 ## [2.4.7] - 2023-04-11
650 - Add worker tasks queue options to pool options.
654 - Fix missing documentation.
656 ## [2.4.6] - 2023-04-10
660 - Ensure one task at a time is executed per worker with tasks queueing enabled.
661 - Properly count worker executing tasks with tasks queueing enabled.
663 ## [2.4.5] - 2023-04-09
667 - Use monotonic high resolution timer for worker tasks runtime.
668 - Add worker tasks median runtime to statistics.
669 - Add worker tasks queue (experimental).
671 ## [2.4.4] - 2023-04-07
675 - Add `PoolEvents` enumeration and `PoolEvent` type.
679 - Destroy worker only on alive check.
681 ## [2.4.3] - 2023-04-07
685 - Fix typedoc generation with inheritance.
687 ## [2.4.2] - 2023-04-06
691 - Add `full` event to dynamic pool.
692 - Keep worker choice strategy in memory for conditional reuse.
696 - Fix possible negative worker key at worker removal in worker choice strategies.
698 ## [2.4.1] - 2023-04-05
702 - Optimize worker choice strategy for dynamic pool.
706 - Ensure dynamic pool does not alter worker choice strategy expected behavior.
708 ## [2.4.0] - 2023-04-04
712 - Add `LESS_BUSY` worker choice strategy.
716 - Optimize worker storage in pool.
717 - Optimize worker alive status check.
718 - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
719 - Optimize `LESS_USED` worker choice strategy.
720 - Update benchmark versus external threads pools.
721 - Optimize tasks usage statistics requirements for worker choice strategy.
725 - Ensure trimmable characters are checked at pool initialization.
726 - Fix message id integer overflow.
727 - Fix pool worker removal in worker choice strategy internals.
728 - Fix package publication with pnpm.
730 ## [2.4.0-3] - 2023-04-04
734 - Add `LESS_BUSY` worker choice strategy.
738 - Optimize worker storage in pool.
739 - Optimize worker alive status check.
740 - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
741 - Optimize `LESS_USED` worker choice strategy.
742 - Update benchmark versus external threads pools.
746 - Ensure trimmable characters are checked at pool initialization.
747 - Fix message id integer overflow.
748 - Fix pool worker removal in worker choice strategy internals.
749 - Fix package publication with pnpm.
751 ## [2.4.0-2] - 2023-04-03
755 - Add `LESS_BUSY` worker choice strategy.
759 - Optimize worker storage in pool.
760 - Optimize worker alive status check.
761 - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
762 - Optimize `LESS_USED` worker choice strategy.
766 - Ensure trimmable characters are checked at pool initialization.
767 - Fix message id integer overflow.
768 - Fix pool worker removal in worker choice strategy internals.
769 - Fix package publication with pnpm.
771 ## [2.4.0-1] - 2023-04-03
775 - Add `LESS_BUSY` worker choice strategy.
779 - Optimize worker storage in pool.
780 - Optimize worker alive status check.
781 - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
782 - Optimize `LESS_USED` worker choice strategy.
786 - Ensure trimmable characters are checked at pool initialization.
787 - Fix message id integer overflow.
788 - Fix pool worker removal in worker choice strategy internals.
790 ## [2.4.0-0] - 2023-04-03
794 - Add `LESS_BUSY` worker choice strategy.
798 - Optimize worker storage in pool.
799 - Optimize worker alive status check.
800 - BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
801 - Optimize `LESS_USED` worker choice strategy.
805 - Ensure trimmable characters are checked at pool initialization.
806 - Fix message id integer overflow.
807 - Fix pool worker removal in worker choice strategy internals.
809 ## [2.3.10] - 2023-03-18
813 - Fix package.json `exports` syntax for ESM and CommonJS.
817 - Permit SemVer pre-release publication.
819 ## [2.3.10-2] - 2023-03-18
823 - Fix package.json `exports` syntax for ESM and CommonJS.
825 ## [2.3.10-1] - 2023-03-18
829 - Permit SemVer pre-release publication.
831 ## [2.3.10-0] - 2023-03-18
835 - Fix package.json `exports` syntax for ESM and CommonJS.
837 ## [2.3.9] - 2023-03-18
841 - Introduce ESM module support along with CommonJS one.
845 - Fix brown paper bag bug referencing the same object literal.
847 ## [2.3.8] - 2023-03-18
851 - Switch internal benchmarking code to benny.
852 - Switch to TypeScript 5.x.x.
853 - Switch rollup bundler plugins to core ones.
854 - Switch to TSDoc syntax.
855 - Enforce conventional commits.
859 - Fix random integer generator.
860 - Fix worker choice strategy pool type identification at initialization.
862 ## [2.3.7] - 2022-10-23
866 - Switch to open collective FOSS project funding platform.
867 - Switch to ts-standard linter configuration on TypeScript code.
871 - Fixed missing async on pool execute method.
872 - Fixed typing in TypeScript example.
873 - Fixed types in unit tests.
875 ## [2.3.6] - 2022-10-22
879 - Cleanup pool attributes and methods.
880 - Refine error types thrown.
884 - Fix continuous integration build on windows.
885 - Fix code coverage reporting by using c8 instead of nyc.
887 ## [2.3.5] - 2022-10-21
891 - Improve benchmarks: add IO intensive task workload, add task size option, integrate code into linter.
892 - Optimize tasks usage lookup implementation.
896 - Fix missed pool event emitter type export.
897 - Fix typedoc documentation generation.
899 ## [2.3.4] - 2022-10-17
903 - Fully automate release process with release-it.
907 - Optimize fair share task scheduling algorithm implementation.
908 - Update benchmark versus external pools results with latest version.
910 ## [2.3.3] - 2022-10-15
914 - Add support for [cluster settings](https://nodejs.org/api/cluster.html#cluster_cluster_settings) in cluster pool options.
916 ## [2.3.2] - 2022-10-14
920 - Optimize fair share worker selection strategy implementation.
924 - Fix WRR worker selection strategy: ensure the condition triggering the round robin can be fulfilled.
926 ## [2.3.1] - 2022-10-13
930 - Pool worker choice strategies:
931 - `WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN` strategy based on weighted round robin scheduling algorithm using tasks execution time for now.
932 - `WorkerChoiceStrategies.FAIR_SHARE` strategy based on fair share scheduling algorithm using tasks execution time for now.
934 ## [2.2.2] - 2022-10-09
938 - Fixed `README.md` file.
940 ## [2.2.1] - 2022-10-08
944 - Dynamic worker choice strategy change at runtime.
946 ## [2.2.0] - 2022-01-05
950 - Support only Node.js version 16.x.x for cluster pool: upstream cluster API have changed on that version.
952 ## [2.1.0] - 2021-08-29
956 - Add an optional pool option `messageHandler` to `PoolOptions<Worker>` for registering a message handler callback on each worker.
960 - `AbstractWorker` class `maxInactiveTime`, `killBehavior` and `async` attributes have been removed in favour of the same ones in the worker options `opts` public attribute.
961 - `AbstractWorker` class `lastTask` attribute have been renamed to `lastTaskTimestamp`.
962 - `AbstractWorker` class `interval` attribute have been renamed to `aliveInterval`.
963 - `AbstractWorker` class cannot be instantiated without specifying the `mainWorker` argument referencing the main worker.
965 ## [2.0.2] - 2021-05-12
969 - Fix `busy` event emission on fixed pool type
971 ## [2.0.1] - 2021-03-16
975 - Check if pool options are properly set.
976 - `busy` event is emitted on all pool types.
978 ## [2.0.0] - 2021-03-01
982 - Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
986 - `FullPool` event is now renamed to `busy`.
987 - `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
988 _Find more details on our JSDoc._
990 - `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed.
992 - We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
994 ### Pool options types declaration merge
996 `FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
998 #### New `export` strategy
1002 const DynamicThreadPool = require('poolifier/lib/dynamic')
1004 const { DynamicThreadPool } = require('poolifier/lib/dynamic')
1007 But you should always prefer just using
1010 const { DynamicThreadPool } = require('poolifier')
1013 #### New type definitions for input data and response
1015 For cluster worker and worker-thread pools, you can now only send and receive structured-cloneable data.
1016 _This is not a limitation by poolifier but Node.js._
1018 #### Public property replacements
1020 `numWorkers` property is now `numberOfWorkers`
1022 #### Internal (protected) properties and methods renaming
1024 These properties are not intended for end users
1026 - `id` => `nextMessageId`
1028 These methods are not intended for end users
1030 - `_chooseWorker` => `chooseWorker`
1031 - `_newWorker` => `createWorker`
1032 - `_execute` => `internalExecute`
1033 - `_chooseWorker` => `chooseWorker`
1034 - `_checkAlive` => `checkAlive`
1036 - `_runAsync` => `runAsync`
1038 ## [1.1.0] - 2020-05-21
1042 - ThreadWorker support async functions as option
1043 - Various external library patches
1045 ## [1.0.0] - 2020-01-24
1049 - FixedThreadPool implementation
1050 - DynamicThreadPool implementation
1051 - WorkerThread implementation to improve developer experience