Skip to content

Commit 4241f64

Browse files
Merge #189
189: links the timeout docs to each other r=yoshuawuyts a=yoshuawuyts Was talking in chat about futures timeouts, and apparently folks missed we had two different timeout functions. This links them to each other so if you find one, you also become aware of the other. Thanks! Co-authored-by: Yoshua Wuyts <[email protected]>
2 parents 8fe7347 + d68d6bb commit 4241f64

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/future/timeout.rs

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ use crate::task::{Context, Poll};
1010

1111
/// Awaits a future or times out after a duration of time.
1212
///
13+
/// If you want to await an I/O future consider using
14+
/// [`io::timeout`](../io/fn.timeout.html) instead.
15+
///
1316
/// # Examples
1417
///
1518
/// ```

src/io/timeout.rs

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ use crate::io;
77

88
/// Awaits an I/O future or times out after a duration of time.
99
///
10+
/// If you want to await a non I/O future consider using
11+
/// [`future::timeout`](../future/fn.timeout.html) instead.
12+
///
1013
/// # Examples
1114
///
1215
/// ```no_run

0 commit comments

Comments
 (0)