Skip to main content

SequenceSession

Struct SequenceSession 

Source
pub struct SequenceSession<R>
where R: DeviceRuntime,
{ /* private fields */ }
Expand description

Core-owned logical sequence lifecycle. It owns sequence resources but no device stream; scheduler-owned execution lanes may serve many sessions.

Implementations§

Source§

impl<R> SequenceSession<R>
where R: DeviceRuntime,

Source

pub fn resources(&self) -> &Arc<AdmittedSequenceResources<R>>

Source

pub fn write_release_capacity_sources( &self, sources: &mut Vec<CapacityAvailabilitySource>, ) -> Result<(), VNextError>

Projects the exact scheduler-visible sources advanced by terminally releasing this sequence authority.

Source

pub const fn epoch(&self) -> SequenceSessionEpoch

Source

pub fn fingerprint(&self) -> &SequenceSessionFingerprint

Source

pub fn sequence_authority(&self) -> SequenceAuthorityId

Source

pub fn request_authority(&self) -> RequestAuthorityId

Source

pub fn register_admission_waiter( &self, deferred: &AdmissionDeferred, ) -> Result<PlanCapacityWaitRegistration<R>, VNextError>

Source

pub fn try_ensure_backing_covers( self: &Arc<Self>, request: SequenceResourceExtensionRequest, ) -> Result<SequenceResourceExtensionDecision<R>, VNextError>

Ensures that the sequence-owned committed backing frontier covers the requested work without making an in-flight frame observe a different physical generation. A frontier already wider than the requested work is returned unchanged. Expensive preparation happens outside the session/backing locks; publication is one short slot -> backing critical section.

Source

pub fn request_cancel( &self, ) -> Result<SequenceSessionCancelSnapshot, VNextError>

Source

pub fn try_complete(&self) -> Result<SequenceSessionTerminalReceipt, VNextError>

Source

pub fn try_abort(&self) -> Result<SequenceSessionTerminalReceipt, VNextError>

Source

pub fn try_abort_if_quiescent( &self, ) -> Result<SequenceSessionTerminalReceipt, VNextError>

Atomically abort an idle session without publishing an intermediate cancellation state.

Capacity preemption uses this transition after a provider reports a pre-submit deferral. If a frame or participant flight is still live, the operation fails without changing the session phase so its caller can reconcile the scheduling transaction without a half-cancelled sequence.

Trait Implementations§

Source§

impl<R> Drop for SequenceSession<R>
where R: DeviceRuntime,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V