pub struct WaitQueue(/* private fields */);Expand description
A list of waiters waiting for some event.
For events that are generated inside Starnix, we walk the wait queue on the thread that triggered the event to notify the waiters that the event has occurred. The waiters will then wake up on their own thread to handle the event.
Implementations§
Source§impl WaitQueue
impl WaitQueue
Sourcepub fn wait_async_value(&self, waiter: &Waiter, value: u64) -> WaitCanceler
pub fn wait_async_value(&self, waiter: &Waiter, value: u64) -> WaitCanceler
Establish a wait for the given value event.
The waiter will be notified when an event with the same value occurs.
This function does not actually block the waiter. To block the waiter,
call the Waiter::wait function on the waiter.
Returns a WaitCanceler that can be used to cancel the wait.
Sourcepub fn wait_async_fd_events(
&self,
waiter: &Waiter,
events: FdEvents,
handler: EventHandler,
) -> WaitCanceler
pub fn wait_async_fd_events( &self, waiter: &Waiter, events: FdEvents, handler: EventHandler, ) -> WaitCanceler
Establish a wait for the given FdEvents.
The waiter will be notified when an event matching the events occurs.
This function does not actually block the waiter. To block the waiter,
call the Waiter::wait function on the waiter.
Returns a WaitCanceler that can be used to cancel the wait.
Sourcepub fn wait_async_signal_mask(
&self,
waiter: &Waiter,
mask: SigSet,
handler: EventHandler,
) -> WaitCanceler
pub fn wait_async_signal_mask( &self, waiter: &Waiter, mask: SigSet, handler: EventHandler, ) -> WaitCanceler
Establish a wait for a particular signal mask.
The waiter will be notified when a signal in the mask is received.
This function does not actually block the waiter. To block the waiter,
Returns a WaitCanceler that can be used to cancel the wait.
Sourcepub fn wait_async(&self, waiter: &Waiter) -> WaitCanceler
pub fn wait_async(&self, waiter: &Waiter) -> WaitCanceler
Establish a wait for any event.
The waiter will be notified when any event occurs.
This function does not actually block the waiter. To block the waiter,
call the Waiter::wait function on the waiter.
Returns a WaitCanceler that can be used to cancel the wait.
pub fn wait_async_simple(&self, waiter: &mut SimpleWaiter)
pub fn notify_fd_events(&self, events: FdEvents)
pub fn notify_signal(&self, signal: &Signal)
pub fn notify_value(&self, value: u64)
pub fn notify_unordered_count(&self, limit: usize)
pub fn notify_all(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WaitQueue
impl !RefUnwindSafe for WaitQueue
impl Send for WaitQueue
impl Sync for WaitQueue
impl Unpin for WaitQueue
impl !UnwindSafe for WaitQueue
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more