pub enum WorkRequest {
Boxed(Box<dyn FnOnce(&ActorRef<ContextMsg>, &ActorRef<BlasMsg>) + Send>),
Sgemm(Box<SgemmRequest>),
SnapshotContext {
reply: Sender<Option<Arc<CudaContext>>>,
},
}Expand description
Pending work item — anything DeviceActor stashes while the context
is not ready. Mirrors the user-facing variants of DeviceMsg minus
internal messages.
Variants§
Boxed(Box<dyn FnOnce(&ActorRef<ContextMsg>, &ActorRef<BlasMsg>) + Send>)
Forward to ContextActor as a typed allocate. We collapse all
per-dtype variants into a single Pending that re-issues the
original message verbatim — Box<dyn FnOnce> keeps each
pending op type-safe without needing N enum variants.
Sgemm(Box<SgemmRequest>)
SnapshotContext
Reply slot for callers who can’t be re-driven (e.g. a SnapshotContext while context isn’t ready).
Auto Trait Implementations§
impl Freeze for WorkRequest
impl !RefUnwindSafe for WorkRequest
impl Send for WorkRequest
impl !Sync for WorkRequest
impl Unpin for WorkRequest
impl UnsafeUnpin for WorkRequest
impl !UnwindSafe for WorkRequest
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