Expand description
The taskchain ensures that tasks are executed sequentially, rather than in parallel. It operates in two distinct modes depending on the type of signal sent:
-
ANY Task Execution:
- Multiple tasks can wait for a signal, but after the current task is completed, the taskchain sends an “ANY” signal.
- This allows any one of the waiting tasks to proceed, though it does not guarantee which one.
-
Specified Task Execution:
- In this mode, only a specific task is allowed to continue after the current task finishes.
- The taskchain sends a signal that specifies exactly which task should be executed next.
The enums Kinds
and Signal
are used to manage these task execution flows.
Kinds
defines the type of task that is expected to proceed, while Signal
controls the activation of tasks in the taskchain.
To be added: UT for timeout
Structs§
- Condvar
Pair - Structure representing a pair of
Mutex<Signal>
andCondvar
to synchronize tasks in the taskchain. - Task
Chain - Structure representing a task-chain that manages the flow of tasks based on signals and expectations.