[][src]Struct async_io::parking::Parker

pub struct Parker { /* fields omitted */ }

Parks a thread.

Implementations

impl Parker[src]

pub fn new() -> Parker[src]

Creates a new Parker.

pub fn park(&self)[src]

Blocks the current thread until the token is made available.

pub fn park_timeout(&self, timeout: Duration) -> bool[src]

Blocks the current thread until the token is made available or the timeout is reached.

pub fn park_deadline(&self, deadline: Instant) -> bool[src]

Blocks the current thread until the token is made available or the deadline is reached.

pub fn unpark(&self)[src]

Atomically makes the token available if it is not already.

pub fn unparker(&self) -> Unparker[src]

Returns a handle for unparking.

Trait Implementations

impl Debug for Parker[src]

impl Default for Parker[src]

impl Drop for Parker[src]

impl RefUnwindSafe for Parker[src]

impl UnwindSafe for Parker[src]

Auto Trait Implementations

impl Send for Parker

impl Sync for Parker

impl Unpin for Parker

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.