pub struct GpuExecutorLease { /* private fields */ }Expand description
Opaque lifecycle-bound capability for synchronous GPU work.
This lease deliberately exposes execution but not pool construction, detached spawning, shutdown, counters, or raw resource-epoch access.
Implementations§
Source§impl GpuExecutorLease
impl GpuExecutorLease
Sourcepub async fn run<F, T>(&self, kind: GpuExecutionJobKind, future: F) -> Result<T>
pub async fn run<F, T>(&self, kind: GpuExecutionJobKind, future: F) -> Result<T>
Runs one job on the lease’s dedicated device executor.
Sourcepub fn run_observed_scoped<B, F, T>(
&self,
kind: GpuExecutionJobKind,
observation: RuntimeObservationHandle,
build_future: B,
) -> impl Future<Output = Result<T>> + Send + 'static + use<B, F, T>
pub fn run_observed_scoped<B, F, T>( &self, kind: GpuExecutionJobKind, observation: RuntimeObservationHandle, build_future: B, ) -> impl Future<Output = Result<T>> + Send + 'static + use<B, F, T>
Runs one observed job and provides explicit job/worker correlation to work that may acquire a service-stream lease.
Sourcepub fn submit_blocking<F, T>(
&self,
kind: GpuExecutionJobKind,
observation: RuntimeObservationHandle,
work: F,
) -> Result<PoolBlockingWork<T>>
pub fn submit_blocking<F, T>( &self, kind: GpuExecutionJobKind, observation: RuntimeObservationHandle, work: F, ) -> Result<PoolBlockingWork<T>>
Submits one blocking worker onto the lease’s dedicated device executor.
This is the synchronous-work counterpart to run: the
worker runs on a bounded blocking thread. It does not run on an async
pool worker, and the same class admission applies. It fits this lease’s remit of
synchronous GPU work without exposing pool construction, detached
spawning, shutdown, or counters.
Trait Implementations§
Source§impl Clone for GpuExecutorLease
impl Clone for GpuExecutorLease
Auto Trait Implementations§
impl !RefUnwindSafe for GpuExecutorLease
impl !UnwindSafe for GpuExecutorLease
impl Freeze for GpuExecutorLease
impl Send for GpuExecutorLease
impl Sync for GpuExecutorLease
impl Unpin for GpuExecutorLease
impl UnsafeUnpin for GpuExecutorLease
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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