pub enum CompletionHandle {
Ready,
Pending(Box<dyn Completion>),
}Expand description
A node’s completion signal, returned by execute_compiled. Step E
Phase A1 foundation: today every dispatch is synchronous, so this is always
CompletionHandle::Ready (the work finished before the call returned) and
callers wait it immediately — byte-identical to the prior Result<()>.
Phases A2/A3 add an async GPU path that returns CompletionHandle::Pending
carrying a device fence/event the executor defers the wait on.
#[must_use]: dropping a Pending handle without waiting would leak
un-awaited async work (harmless for today’s Ready, a correctness bug once
A2/A3 land) — callers must wait it or thread it to the executor.
Variants§
Ready
The work finished synchronously before execute_compiled returned —
wait is a no-op.
Pending(Box<dyn Completion>)
The work was enqueued asynchronously; wait
blocks until the carried device signal fires. (No producers until A2/A3.)
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CompletionHandle
impl !Sync for CompletionHandle
impl !UnwindSafe for CompletionHandle
impl Freeze for CompletionHandle
impl Send for CompletionHandle
impl Unpin for CompletionHandle
impl UnsafeUnpin for CompletionHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more