Expand description
ActiveRun: tracks every tune run currently executing in a background task, so
crate::routes::runs can cancel one specific run and graceful shutdown can cancel and
wait for all in-flight runs to be restored before the process actually exits.
Multiple tune tasks are allowed. A short-lived exclusive reservation is still used for post-hoc PID writes/reverts, because those operations mutate a live loop directly and must not overlap a tune or another write/revert.
Structs§
- Active
Run - Cheap to clone (an
Arc<Mutex<..>>underneath), matchingcrate::state::AppState’s ownClonerequirement for axum’sStateextractor. - RunAlready
Active - Returned by
ActiveRun::startorActiveRun::reservewhen an exclusive write/revert reservation is already held.