Struct tikv::server::lock_manager::waiter_manager::Delay [−][src]
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
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][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src][+]
W: ConvertTo<V>,
impl<T> From<T> for T
[src][+]
impl<T> FutureExt for T where
T: Future + ?Sized,
[src][+]
T: Future + ?Sized,
impl<T> Instrument for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<F> IntoFuture for F where
F: Future,
[src][+]
F: Future,
impl<T> Pointable for T
[src][+]
impl<T> Pointable for T
[src][+]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,