Skip to main content

spawn_agent_lifecycle_job

Function spawn_agent_lifecycle_job 

pub fn spawn_agent_lifecycle_job<F, T>(future: F) -> JoinHandle<T> ⓘ
where F: Future<Output = T> + Send + 'static, T: Send + 'static,
Expand description

Detach retained lifecycle work without exposing it to request cancellation.

The owned future captures its destructive leases itself and releases them only when it completes; dropping the returned handle does not cancel the task, so request cancellation cannot release the leases while the transaction or cleanup is still running. The future may commit its reservations mid-flight (see AgentDeleteLease::commit_destructive_mutation).