pub struct SchedulerHandle<E> { /* private fields */ }Expand description
Cloneable handle used by recv threads and the write path to schedule events without ever touching the worker’s heap. Every method is a lock-free channel send.
Implementations§
Source§impl<E> SchedulerHandle<E>
impl<E> SchedulerHandle<E>
Sourcepub fn raise_at(&self, at: Instant, event: E) -> bool
pub fn raise_at(&self, at: Instant, event: E) -> bool
Schedule event to fire at the given instant. Wakes the worker if this
is now the earliest pending deadline. Returns false if the worker has
already shut down (channel disconnected).
Sourcepub fn raise_in(&self, delay: Duration, event: E) -> bool
pub fn raise_in(&self, delay: Duration, event: E) -> bool
Schedule event to fire after delay from now.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for SchedulerHandle<E>
impl<E> RefUnwindSafe for SchedulerHandle<E>
impl<E> Send for SchedulerHandle<E>where
E: Send,
impl<E> Sync for SchedulerHandle<E>where
E: Send,
impl<E> Unpin for SchedulerHandle<E>
impl<E> UnsafeUnpin for SchedulerHandle<E>
impl<E> UnwindSafe for SchedulerHandle<E>
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