struct Inner {
state: AtomicUsize,
mutex: Mutex<()>,
condvar: Condvar,
shared: Arc<Shared>,
}Fields§
§state: AtomicUsizeAvoids entering the park if possible
mutex: Mutex<()>Used to coordinate access to the driver / condvar
condvar: CondvarCondvar to block on if the driver is unavailable.
Resource (I/O, time, …) driver
Implementations§
Source§impl Inner
impl Inner
Sourcefn park_condvar(&self, duration: Option<Duration>)
fn park_condvar(&self, duration: Option<Duration>)
Parks the current thread using a condvar for up to duration.
If duration is None, parks indefinitely until notified.
§Panics
Panics if duration is Some and the duration is zero.
fn park_driver( &self, driver: &mut Driver, handle: &Handle, duration: Option<Duration>, )
fn unpark(&self, driver: &Handle)
fn unpark_condvar(&self)
fn shutdown(&self, handle: &Handle)
Auto Trait Implementations§
impl !Freeze for Inner
impl !RefUnwindSafe for Inner
impl Send for Inner
impl Sync for Inner
impl Unpin for Inner
impl !UnwindSafe for Inner
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