pub(crate) struct State {
pub(crate) queue: ConcurrentQueue<Runnable>,
pub(crate) local_queues: RwLock<Vec<Arc<ConcurrentQueue<Runnable>>>>,
pub(crate) notified: AtomicBool,
pub(crate) sleepers: Mutex<Sleepers>,
pub(crate) active: Mutex<Slab<Waker>>,
}Expand description
The state of a executor.
Fields§
§queue: ConcurrentQueue<Runnable>The global queue.
local_queues: RwLock<Vec<Arc<ConcurrentQueue<Runnable>>>>Local queues created by runners.
notified: AtomicBoolSet to true when a sleeping ticker is notified or no tickers are sleeping.
sleepers: Mutex<Sleepers>A list of sleeping tickers.
active: Mutex<Slab<Waker>>Currently active tasks.
Implementations§
Auto Trait Implementations§
impl !Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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