mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-21 00:00:10 +02:00
time: Add comment about cancelation of timed out futures (#2206)
While the module documentation explains that a timed out future (as created through the tokio::time::timeout function) is canceled, the function's actual documentation doesn't mention that at all. This change adds this relevant information to the documentation.
This commit is contained in:
@@ -14,7 +14,8 @@ use std::task::{self, Poll};
|
||||
/// Require a `Future` to complete before the specified duration has elapsed.
|
||||
///
|
||||
/// If the future completes before the duration has elapsed, then the completed
|
||||
/// value is returned. Otherwise, an error is returned.
|
||||
/// value is returned. Otherwise, an error is returned and the future is
|
||||
/// canceled.
|
||||
///
|
||||
/// # Cancelation
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user