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. !


  • Better shared pointer.
  • Additional utilities.


  • Main structure for managing tasks.
  • Context of a task execution body.
  • 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.
  • 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.
  • An object responsible to notify follow-up tasks.
  • Task construct without any functional logic.
  • Task that is already scheduled for running.
  • Handle object holding a worker thread alive.

Type Aliases

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