pub struct WaitList<L: Lock, I, O> {
pub lock: L,
/* private fields */
}Expand description
An intrusive linked list of futures.
Fields
lock: LThe lock used by the WaitList.
This is used for internal synchronization, but you can also protect arbitrary state useful to you in here.
Implementations
sourceimpl<L, I, O> WaitList<L, I, O> where
<Empty<L> as Iterator>::Item: Lock,
impl<L, I, O> WaitList<L, I, O> where
<Empty<L> as Iterator>::Item: Lock,
sourcepub fn lock_exclusive(&self) -> LockedExclusive<'_, L, I, O>
pub fn lock_exclusive(&self) -> LockedExclusive<'_, L, I, O>
Take an exclusive lock on the contents of this list.
This function should not be called recursively as it may deadlock, panic or abort.
Take a shared lock on the contents of this list.
If your chosen lock type only supports exclusive locks, this will take an exclusive lock instead.
Trait Implementations
impl<L: Lock, I, O> Send for WaitList<L, I, O> where
L: Send,
I: Send,
impl<L: Lock, I, O> Sync for WaitList<L, I, O> where
L: Sync,
I: Send + Sync,
O: Send,
Auto Trait Implementations
impl<L, I, O> !RefUnwindSafe for WaitList<L, I, O>
impl<L, I, O> Unpin for WaitList<L, I, O> where
L: Unpin,
impl<L, I, O> !UnwindSafe for WaitList<L, I, O>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more