pub struct SessionRunRegistration { /* private fields */ }Expand description
Exact-run ownership lease returned by
SessionActivationRouter::register_run.
The lease deliberately owns the safe-point receiver. Dropping it before the normal finalization handshake schedules exact-run cleanup, reconciles the durable activation watermark, and gives the router one chance to launch a successor. A stale lease can never clear a newer owner.
Implementations§
Source§impl SessionRunRegistration
impl SessionRunRegistration
pub fn notifications_mut(&mut self) -> &mut Receiver<u64>
Sourcepub fn set_abort_cleanup<F, Fut>(&mut self, cleanup: F)
pub fn set_abort_cleanup<F, Fut>(&mut self, cleanup: F)
Run host-specific exact-reservation cleanup before an abandoned owner asks the router to reserve a successor.
pub async fn begin_finalization(&mut self)
Sourcepub async fn abandon(self)
pub async fn abandon(self)
Synchronously abandon this exact ownership lease.
Most cancellation paths can rely on Drop, which schedules the same
cleanup. Startup paths that must return a truthful retryable response
use this method so the runner slot and router owner are released before
the response becomes observable. Cleanup runs in a detached owned task:
cancelling the caller’s wait cannot strand an already-taken host
cleanup closure or this router owner.
Sourcepub async fn finish(
self,
admitted_generation: u64,
) -> Result<Option<SessionActivationDisposition>, SessionActivationError>
pub async fn finish( self, admitted_generation: u64, ) -> Result<Option<SessionActivationDisposition>, SessionActivationError>
Complete the normal exact-owner handshake. The Drop fallback remains armed across the await and is disabled only after finalization returns.