Expand description
Centralized, parallel-safe progress and terminal reporting.
ProgressReporter registers every project task under an exact
parameter-derived TaskIdentity, assigns ordering from configuration, and
becomes the sole human-facing terminal writer for its lifetime. Worker
threads receive non-clone TaskProgress handles and synchronize absolute
iteration from their authoritative scientific state.
Iteration updates use per-task atomics. One renderer thread polls them at a bounded frequency, so numerical workers never draw progress bars or contend on terminal locks. Interactive stderr receives a multi-progress display; redirected stderr receives stable lifecycle lines. Tests and embedding applications may retain tracking while selecting hidden output.
§Minimal parallel use
use scientific_workflow::prelude::*;
let project = ScientificProject::load("project-root")?;
let reporter = ProgressReporter::for_project(&project)
.identify_tasks_by(["temperature", "seed"])
.start()?;
let progress = reporter.start_task(&task, 0, Some(1_000))?;
progress.set_iteration(1_000)?;
progress.complete(None)?;
let summary = reporter.complete("scientific work completed")?;
assert!(summary.is_success());Structs§
- Progress
Reporter - Central progress registry and exclusive human-facing terminal owner.
- Progress
Reporter Builder - Builder for one process-wide progress-reporting session.
- Progress
Summary - Immutable aggregate captured when centralized reporting ends.
- Task
Identity - Exact parameter-derived identity of one task.
- Task
Progress - Non-clone task-local progress handle.
Enums§
- Reporting
Error - Failure while configuring, updating, or finalizing progress reporting.
- Task
Status - Lifecycle status of one independently executing scientific task.