[−][src]Struct bastion_executor::run_queue::Worker
A worker queue.
This is a FIFO or LIFO queue that is owned by a single thread, but other threads may steal tasks from it. Task schedulers typically create a single worker queue per thread.
Methods
impl<T> Worker<T>
[src]
pub fn new_fifo() -> Worker<T>
[src]
Creates a FIFO worker queue.
pub fn new_lifo() -> Worker<T>
[src]
Creates a LIFO worker queue.
pub fn worker_run_queue_size(&self) -> usize
[src]
Get the worker's run queue size
pub fn stealer(&self) -> Stealer<T>
[src]
Creates a stealer for this queue.
The returned stealer can be shared among threads and cloned.
pub fn is_empty(&self) -> bool
[src]
Returns true
if the queue is empty.
pub fn push(&self, task: T)
[src]
Pushes a task into the queue.
pub fn pop(&self) -> Option<T>
[src]
Pops a task from the queue.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Worker<T>
impl<T> !Sync for Worker<T>
impl<T> Unpin for Worker<T>
impl<T> UnwindSafe for Worker<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsAny for T where
T: Any,
[src]
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,