Expand description
Shared execution context passed to every task.
A Context is created once per run and shared (via Arc) across all
tasks. It provides three things tasks commonly need:
- a typed key/value blackboard for passing data between tasks,
- cooperative cancellation (e.g. for graceful shutdown),
- a lightweight event bus used by
crate::tasks::EventDrivenTask.
Structsยง
- Cancel
Token - A cooperative cancellation token.
- Context
- Per-run shared state handed to tasks.