pub struct TaskSupervisor { /* private fields */ }Expand description
Retains every runtime join until observed complete.
Implementations§
Source§impl TaskSupervisor
impl TaskSupervisor
Sourcepub fn registered_count(&self) -> usize
pub fn registered_count(&self) -> usize
Number of tasks still registered (including abort-requested).
Sourcepub fn tasks_for(&self, tx: &TransactionId) -> Vec<TaskId>
pub fn tasks_for(&self, tx: &TransactionId) -> Vec<TaskId>
Tasks still associated with a transaction.
Sourcepub fn spawn<F>(&mut self, class: TaskClass, future: F) -> TaskId
pub fn spawn<F>(&mut self, class: TaskClass, future: F) -> TaskId
Register then spawn. The future does not run until after registration completes (start-gate released at the end of this method).
Sourcepub fn abort(&mut self, id: TaskId)
pub fn abort(&mut self, id: TaskId)
Request abort; task remains registered until join is observed.
Sourcepub fn abort_transaction(&mut self, tx: &TransactionId)
pub fn abort_transaction(&mut self, tx: &TransactionId)
Abort all tasks for a transaction.
Sourcepub fn abort_transaction_residuals(&mut self, tx: &TransactionId)
pub fn abort_transaction_residuals(&mut self, tx: &TransactionId)
Abort residual tx work but keep TaskClass::Finalizer and
TaskClass::EventPublisher alive so Seal + completion publication can
finish (one completion per admission).
Sourcepub fn abort_transaction_except_finalizer(&mut self, tx: &TransactionId)
pub fn abort_transaction_except_finalizer(&mut self, tx: &TransactionId)
Hard-grace abort: keep only TaskClass::Finalizer so Seal→completion
can finish; abort a stuck EventPublisher that already Sealed or timed out.
Sourcepub async fn abort_and_drain(&mut self) -> bool
pub async fn abort_and_drain(&mut self) -> bool
Abort all tasks and observe joins until the set is empty.
Returns false if joins do not complete within the bound — caller MUST
remain Quiescing (never report Stopped while owned work remains).
Live JoinHandles are retained (§7.3 / §21: no drop on deadline).