diff --git a/src/reactor/timeout.rs b/src/reactor/timeout.rs index 604dccca0..b67ab38ed 100644 --- a/src/reactor/timeout.rs +++ b/src/reactor/timeout.rs @@ -49,6 +49,17 @@ impl Timeout { /// Resets this timeout to an new timeout which will fire at the time /// specified by `at`. + /// + /// This method is usable even of this instance of `Timeout` has "already + /// fired". That is, if this future has resovled, calling this method means + /// that the future will still re-resolve at the specified instant. + /// + /// If `at` is in the past then this future will immediately be resolved + /// (when `poll` is called). + /// + /// Note that if any task is currently blocked on this future then that task + /// will be dropped. It is required to call `poll` again after this method + /// has been called to ensure tha ta task is blocked on this future. pub fn reset(&mut self, at: Instant) { self.when = at; self.token.reset_timeout(self.when, &self.handle);