pub struct AsyncExecutor { /* private fields */ }Expand description
Async execution engine with enhanced batching and priority support
Implementations§
Source§impl AsyncExecutor
impl AsyncExecutor
Sourcepub fn with_batch_size(device: Device, batch_size: usize) -> Self
pub fn with_batch_size(device: Device, batch_size: usize) -> Self
Create a new async executor with specified batch size
Sourcepub fn submit(&self, kernel: Box<dyn AsyncKernel>) -> AsyncOperation
pub fn submit(&self, kernel: Box<dyn AsyncKernel>) -> AsyncOperation
Submit an async operation
Sourcepub fn submit_with_priority(
&self,
kernel: Box<dyn AsyncKernel>,
priority: Priority,
) -> AsyncOperation
pub fn submit_with_priority( &self, kernel: Box<dyn AsyncKernel>, priority: Priority, ) -> AsyncOperation
Submit an async operation with specified priority
Sourcepub async fn process_queue(&self) -> Result<()>
pub async fn process_queue(&self) -> Result<()>
Process pending operations with advanced batching and priority handling
Sourcepub fn queue_length(&self) -> usize
pub fn queue_length(&self) -> usize
Get total queue length (both normal and high priority)
Sourcepub fn queue_length_by_priority(&self, high_priority: bool) -> usize
pub fn queue_length_by_priority(&self, high_priority: bool) -> usize
Get queue length by priority
Sourcepub fn clear_queue(&self)
pub fn clear_queue(&self)
Clear all pending operations
Sourcepub fn get_stats(&self) -> ExecutorStats
pub fn get_stats(&self) -> ExecutorStats
Get execution statistics
Sourcepub fn reset_stats(&self)
pub fn reset_stats(&self)
Reset execution statistics
Sourcepub fn is_processing(&self) -> bool
pub fn is_processing(&self) -> bool
Check if executor is currently processing
Auto Trait Implementations§
impl Freeze for AsyncExecutor
impl RefUnwindSafe for AsyncExecutor
impl Send for AsyncExecutor
impl Sync for AsyncExecutor
impl Unpin for AsyncExecutor
impl UnsafeUnpin for AsyncExecutor
impl UnwindSafe for AsyncExecutor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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