altair-concurrent
Type-safe parallel execution of named async tasks with cancellation, timeout, and per-task tracing.
Part of the altair-rs workspace.
Add to your project
Quick start
use *;
use Duration;
async
Features
- Named tasks —
HashMap<&'static str, T>results, not positional tuples - Tracing — each task runs inside a
tracing::info_span!("concurrent.task", task.name = ...)so it shows up as a separate node in distributed traces - Cancellation — pass a
CancellationToken; cancelling it aborts all tasks - Timeout —
.with_timeout(Duration); expires cancel remaining tasks - Fail-fast or partial — by default, the first error cancels remaining tasks;
with_partial_results()switches to "run all, surface first error" semantics
Constraints
- All tasks must return the same
Result<T, E>. For heterogeneous batches, usetokio::join!directly. - Built on
tokio::task::JoinSet; tokio is the only supported runtime.