pub struct CallQueue { /* private fields */ }Implementations§
Source§impl CallQueue
impl CallQueue
Sourcepub fn start<F>(host: Host, opts: QueueOptions, work: F) -> CallQueue
pub fn start<F>(host: Host, opts: QueueOptions, work: F) -> CallQueue
Start opts.threads workers running work on each call pushed — and
on calls saved by the last shutdown, first.
pub fn push(&self, call: ConcludedCall)
pub fn is_empty(&self) -> bool
Sourcepub fn shutdown(&mut self, grace: Duration)
pub fn shutdown(&mut self, grace: Duration)
Work what’s ready until grace is nearly up; save the rest (or fail it).
Call it from crate::Plugin::shutdown; calls pushed after it are refused.
Auto Trait Implementations§
impl !RefUnwindSafe for CallQueue
impl !UnwindSafe for CallQueue
impl Freeze for CallQueue
impl Send for CallQueue
impl Sync for CallQueue
impl Unpin for CallQueue
impl UnsafeUnpin for CallQueue
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