Crate taskchain

Source
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:

  1. 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.
  2. 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§

CondvarPair
Structure representing a pair of Mutex<Signal> and Condvar to synchronize tasks in the taskchain.
TaskChain
Structure representing a task-chain that manages the flow of tasks based on signals and expectations.

Enums§

Kinds
Enum representing different kinds of tasks in the taskchain.
Signal
Enum representing different types of signals that can be used to control the taskchain.