summaryrefslogtreecommitdiffstats
path: root/tokio/src/time/timeout.rs
diff options
context:
space:
mode:
authorDaniel Müller <d-e-s-o@users.noreply.github.com>2020-02-01 14:04:17 -0800
committerGitHub <noreply@github.com>2020-02-01 14:04:17 -0800
commit64e75ad1b0ad089861715ddca8a5df20756792a3 (patch)
treecc1f88923a965124e270a9e8948458cd091a2523 /tokio/src/time/timeout.rs
parent1a5de2c79d9d825c367f7881646306fe7f9aaa0c (diff)
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.
Diffstat (limited to 'tokio/src/time/timeout.rs')
-rw-r--r--tokio/src/time/timeout.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tokio/src/time/timeout.rs b/tokio/src/time/timeout.rs
index 561dc0ca..7a372544 100644
--- a/tokio/src/time/timeout.rs
+++ b/tokio/src/time/timeout.rs
@@ -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
///