struct WakerShared<const LEN: usize>{
waker: AtomicWaker,
active: GenericArray<AtomicUsize, <Const<LEN> as Internal>::LengthInWords>,
}Fields§
§waker: AtomicWaker§active: GenericArray<AtomicUsize, <Const<LEN> as Internal>::LengthInWords>Each bit stores the flag for a sub-future of an Executor, to determine which need to run on each poll.
Implementations§
Sourceconst fn new() -> Self
const fn new() -> Self
Creates a new WakerShared that can store the state of at least LEN sub-futures.
Sourcefn reset(&self, index: usize) -> bool
fn reset(&self, index: usize) -> bool
Clears the flag for the index sub-future, and returns the previous value.
Sourcefn reset_all(&self) -> impl Iterator<Item = usize> + use<'_, LEN>
fn reset_all(&self) -> impl Iterator<Item = usize> + use<'_, LEN>
Clears all flags and returns the indexes of any that were set.
Sourcefn set(&self, index: usize) -> bool
fn set(&self, index: usize) -> bool
Sets the flag for the index sub-future, and returns the previous value, waking any currently registered outer
waker in the process.
Sourceasync fn register_current(&self)
async fn register_current(&self)
Registers the Waker of the current context as to-be-woken when any sub-future wakes.
Sourcefn get_active_ref_and_mask(&self, index: usize) -> (&AtomicUsize, usize)
fn get_active_ref_and_mask(&self, index: usize) -> (&AtomicUsize, usize)
Gets the word that the index flag is stored in, and the mask to identify the flag within the word.
Trait Implementations§
Auto Trait Implementations§
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