Skip to content

Commit 7ec9327

Browse files
committed
Update terminology
1 parent aa2b93d commit 7ec9327

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

rfcs/0014-task-workers.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ The pool should also be re-used when multiple projects are being built, either i
3030
### Terminology
3131

3232
* `Worker`: A Node.js [Worker thread](https://nodejs.org/api/worker_threads.html) instance
33-
* `Task Processor`: A module associated with a UI5 Tooling build task (standard or custom) that can be executed in a `Worker`
33+
* `Build Task`: A UI5 Tooling build task such as "minify" or "buildThemes" (standard tasks) or any [custom task](https://sap.github.io/ui5-tooling/stable/pages/extensibility/CustomTasks/)
34+
* `Task Processor`: A module associated with a UI5 Tooling Build Task (standard or custom) that can be executed in a `Worker`
35+
* `Dispatch Broker`: A ui5-project module coupled to the lifecycle of a Graph Build (similar to the `ProjectBuildContext`). It forwards requests from Build Tasks
3436
* `Thread Runner`: A ui5-project module that will be loaded in a `Worker`. It handles communication with the main thread and executes a `Task Processor` on request
35-
* `Dispatcher`: A ui5-project singleton module which uses a library like [`workerpool`](https://github.com/josdejong/workerpool) to spawn and manage `Worker` instances in order to have them execute any `Task Processor` requested by the build task
37+
* `Dispatcher`: A ui5-project singleton module which uses a library like [`workerpool`](https://github.com/josdejong/workerpool) to spawn and manage `Worker` instances in order to have them execute any `Task Processor` requested by the Build Task
3638
- Handles the `Worker` lifecycle
3739

3840
![](./resources/0014-task-workers.png)
@@ -58,7 +60,7 @@ The pool should also be re-used when multiple projects are being built, either i
5860

5961
Similar to Tasks, Task Processors shall be invoked with a well defined signature:
6062

61-
* `resources`: An array of `@ui5/fs/Resource` provided by the build task
63+
* `resources`: An array of `@ui5/fs/Resource` provided by the Build Task
6264
* `options`: An object provided by the build task
6365
* `workspace`: Reader to read project files
6466
* `dependencies`: Reader or collection to read dependency files
@@ -113,7 +115,9 @@ module.exports = function({workspace, options, processors}) {
113115
const res = await processors.execute("computePi", {
114116
options: {
115117
digits: 1000000
116-
}
118+
},
119+
workspace, // optional overwrite of the workspace parameter
120+
dependencies, // optional overwrite of the dependencies parameter
117121
});
118122
// [...]
119123
};

0 commit comments

Comments
 (0)