Crate choir

Crate choir 

Source
Expand description

Task Orchestration Framework.

This framework helps to organize the execution of a program into a live task graph. In this model, all the work is happening inside tasks, which are scheduled to run by the Choir.

Lifetime of a Task:

  1. Idle: task is just created.
  2. Initialized: function body is assigned.
  3. Scheduled: no more dependencies can be added to the task.
  4. Executing: task was dispatched from the queue by one of the workers.
  5. Done: task is retired. !

Modules§

arc
Better shared pointer.
util
Additional utilities.

Structs§

Choir
Main structure for managing tasks.
ExecutionContext
Context of a task execution body.
IdleTask
Task that is created but not running yet. It will be scheduled on run() or on drop. The ’a lifetime is responsible for the data in the closure of the task function.
MaybePanic
Return type for join functions that have to detect panics. Does actual panic on drop if any of the tasks have panicked. Note: an idiomatic Result is not used because it’s not actionable.
Notifier
An object responsible to notify follow-up tasks.
ProtoTask
Task construct without any functional logic.
RunningTask
Task that is already scheduled for running.
WorkerHandle
Handle object holding a worker thread alive.

Type Aliases§

Name
Name to be associated with a task.
SubIndex
Index of a sub-task inside a multi-task.