docs: refine task stealing documentation
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 27 Sep 2023 18:41:03 +0000 (20:41 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 27 Sep 2023 18:41:03 +0000 (20:41 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
CHANGELOG.md
README.md
docs/api.md
src/pools/pool.ts

index 8b7d694d2dfaa3f424ad0cbbff3a1565894b4363..19b7b283d14a7691c913b59640a433b1b4deb5c4 100644 (file)
@@ -60,7 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 - Add `startWorkers` to pool options to whether start the minimum number of workers at pool initialization or not.
 - Add `start()` method to pool API to start the minimum number of workers.
-- Add `taskStealing` and `tasksStealingOnPressure` to tasks queue options to whether enable task stealing or not and whether enable tasks stealing on back pressure or not.
+- 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.
 - Continuous internal benchmarking: [https://poolifier.github.io/benchmark-results/dev/bench](https://poolifier.github.io/benchmark-results/dev/bench).
 
 ## [2.6.44] - 2023-09-08
index c0d1e26a7fbf2e06aefa3d98686fb399e26e331c..e7b7a5d1f75a3ad6e90927ed1a2efe3441136a04 100644 (file)
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@ Please consult our [general guidelines](#general-guidelines).
 - Tasks distribution strategies :white_check_mark:
 - Lockless tasks queueing :white_check_mark:
 - Queued tasks rescheduling:
-  - Task stealing :white_check_mark:
+  - Task stealing on empty queue :white_check_mark:
   - Tasks stealing under back pressure :white_check_mark:
   - Tasks redistribution on worker error :white_check_mark:
 - General guidelines on pool choice :white_check_mark:
index 91185f77d7abb7bbc9acbd306251dbcb9e62b041..f9af05a73780e225d50f0b97ebbbca4f35a433c3 100644 (file)
@@ -136,8 +136,8 @@ An object with these properties:
 
   - `size` (optional) - The maximum number of tasks that can be queued on a worker before flagging it as back pressured. It must be a positive integer.
   - `concurrency` (optional) - The maximum number of tasks that can be executed concurrently on a worker. It must be a positive integer.
-  - `taskStealing` (optional) - Task stealing enablement.
-  - `tasksStealingOnBackPressure` (optional) - Tasks stealing enablement on back pressure.
+  - `taskStealing` (optional) - Task stealing enablement on empty queue.
+  - `tasksStealingOnBackPressure` (optional) - Tasks stealing enablement under back pressure.
 
   Default: `{ size: (pool maximum size)^2, concurrency: 1, taskStealing: true, tasksStealingOnBackPressure: true }`
 
index 118b283246e8fc71691911ea816726a3b716ff01..06989941fd7030c52286cd0c18a3c909d654c2db 100644 (file)
@@ -110,13 +110,13 @@ export interface TasksQueueOptions {
    */
   readonly concurrency?: number
   /**
-   * Whether to enable task stealing.
+   * Whether to enable task stealing on empty queue.
    *
    * @defaultValue true
    */
   readonly taskStealing?: boolean
   /**
-   * Whether to enable tasks stealing on back pressure.
+   * Whether to enable tasks stealing under back pressure.
    *
    * @defaultValue true
    */