pub struct SessionActivationLaunch {
pub run_id: String,
/* private fields */
}Expand description
A reservation whose runner slot already exists but whose task has not yet
been launched. The router publishes the logical owner before calling
launch, so even an immediately-completing task participates in the
finalization handshake.
Fields§
§run_id: StringImplementations§
Source§impl SessionActivationLaunch
impl SessionActivationLaunch
pub fn new( run_id: impl Into<String>, launch: impl FnOnce() + Send + 'static, ) -> Self
Sourcepub fn new_with_rollback(
run_id: impl Into<String>,
launch: impl FnOnce() + Send + 'static,
rollback: impl FnOnce() + Send + 'static,
) -> Self
pub fn new_with_rollback( run_id: impl Into<String>, launch: impl FnOnce() + Send + 'static, rollback: impl FnOnce() + Send + 'static, ) -> Self
Build a launch backed by an already-reserved external runner slot.
If the launch is dropped before launch commits, rollback must release
that exact reservation. This makes cancellation between the spawner
returning and the router publishing ownership recoverable.
Sourcepub fn new_with_async_rollback<F, Fut>(
run_id: impl Into<String>,
launch: impl FnOnce() + Send + 'static,
rollback: F,
) -> Self
pub fn new_with_async_rollback<F, Fut>( run_id: impl Into<String>, launch: impl FnOnce() + Send + 'static, rollback: F, ) -> Self
Build a launch whose exact external runner reservation is released asynchronously if publication is cancelled. The router does not release its coalescing token until this future completes, preventing a newer activation from adopting the still-present unlaunched slot.