pub struct ThreadWakeBatch { /* private fields */ }Expand description
A task-context wake list backed by nodes embedded in each thread core.
Queue owners add handles while holding their own metadata lock, release
that lock, and then call Self::wake_all. This is the same ownership
split as Linux wake_q: unlink and select atomically under the domain lock,
perform scheduler wakes afterwards, and never allocate in between.
A thread can occur at most once in all live batches. Duplicate insertion is
coalesced and returns false. The batch is deliberately neither Send nor
Sync; the task context that selected the waiters must drain it.
Implementations§
Source§impl ThreadWakeBatch
impl ThreadWakeBatch
Sourcepub fn push(&mut self, wake: ThreadWakeHandle) -> bool
pub fn push(&mut self, wake: ThreadWakeHandle) -> bool
Adds a wake handle, returning false when this thread is already in a
live batch.
Trait Implementations§
Source§impl Default for ThreadWakeBatch
impl Default for ThreadWakeBatch
Source§impl Drop for ThreadWakeBatch
impl Drop for ThreadWakeBatch
Auto Trait Implementations§
impl !RefUnwindSafe for ThreadWakeBatch
impl !Send for ThreadWakeBatch
impl !Sync for ThreadWakeBatch
impl !UnwindSafe for ThreadWakeBatch
impl Freeze for ThreadWakeBatch
impl Unpin for ThreadWakeBatch
impl UnsafeUnpin for ThreadWakeBatch
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