pub(super) struct ReadyToRunQueue<Fut> {
pub(super) waker: AtomicWaker,
pub(super) head: AtomicPtr<Task<Fut>>,
pub(super) tail: UnsafeCell<*const Task<Fut>>,
pub(super) stub: Arc<Task<Fut>>,
}
Fields§
§waker: AtomicWaker
§head: AtomicPtr<Task<Fut>>
§tail: UnsafeCell<*const Task<Fut>>
§stub: Arc<Task<Fut>>
Implementations§
source§impl<Fut> ReadyToRunQueue<Fut>
impl<Fut> ReadyToRunQueue<Fut>
An MPSC queue into which the tasks containing the futures are inserted whenever the future inside is scheduled for polling.
sourcepub(super) fn enqueue(&self, task: *const Task<Fut>)
pub(super) fn enqueue(&self, task: *const Task<Fut>)
The enqueue function from the 1024cores intrusive MPSC queue algorithm.
sourcepub(super) unsafe fn dequeue(&self) -> Dequeue<Fut>
pub(super) unsafe fn dequeue(&self) -> Dequeue<Fut>
The dequeue function from the 1024cores intrusive MPSC queue algorithm
Note that this is unsafe as it required mutual exclusion (only one thread can call this) to be guaranteed elsewhere.
pub(super) fn stub(&self) -> *const Task<Fut>
Trait Implementations§
Auto Trait Implementations§
impl<Fut> !Freeze for ReadyToRunQueue<Fut>
impl<Fut> !RefUnwindSafe for ReadyToRunQueue<Fut>
impl<Fut> !Send for ReadyToRunQueue<Fut>
impl<Fut> !Sync for ReadyToRunQueue<Fut>
impl<Fut> Unpin for ReadyToRunQueue<Fut>
impl<Fut> !UnwindSafe for ReadyToRunQueue<Fut>
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