Struct tikv::server::lock_manager::waiter_manager::Delay[][src]

struct Delay {
    inner: Rc<RefCell<DelayInner>>,
    deadline: Instant,
}

Delay is a wrapper of tokio_timer::Delay which has a resolution of one millisecond. It has some extra features than tokio_timer::Delay used by WaiterManager.

Delay performs no work and completes with true once the specified deadline has been reached. If it has been cancelled, it will complete with false at arbitrary time.

Fields

inner: Rc<RefCell<DelayInner>>deadline: Instant

Implementations

impl Delay[src]

fn new(deadline: Instant) -> Self[src]

Create a new Delay instance that elapses at deadline.

fn reset(&self, deadline: Instant)[src]

Resets the instance to an earlier deadline.

fn cancel(&self)[src]

Cancels the instance. It will complete with false at arbitrary time.

fn is_cancelled(&self) -> bool[src]

Trait Implementations

impl Clone for Delay[src]

impl Future for Delay[src]

type Output = bool

The type of value produced on completion.

Auto Trait Implementations

impl !RefUnwindSafe for Delay

impl !Send for Delay

impl !Sync for Delay

impl Unpin for Delay

impl !UnwindSafe for Delay

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<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

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

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T> Instrument for T[src]

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

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]