mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
Add a warning regarding the use of Stdin
handles (#876)
Also see the discussion on issue #589.
This commit is contained in:
parent
fca41d4e73
commit
ce2147d2b6
@ -7,6 +7,12 @@ use std::io::{self, Read, Stdin as StdStdin};
|
||||
/// The handle implements the [`AsyncRead`] trait, but beware that concurrent
|
||||
/// reads of `Stdin` must be executed with care.
|
||||
///
|
||||
/// As an additional caveat, reading from the handle may block the calling
|
||||
/// future indefinitely, if there is not enough data available. This makes this
|
||||
/// handle unsuitable for use in any circumstance where immediate reaction to
|
||||
/// available data is required, e.g. interactive use or when implementing a
|
||||
/// subprocess driven by requests on the standard input.
|
||||
///
|
||||
/// Created by the [`stdin`] function.
|
||||
///
|
||||
/// [`stdin`]: fn.stdin.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user