Function termion::async_stdin [] [src]

pub fn async_stdin() -> AsyncReader

Construct an asynchronous handle to the TTY standard input.

This allows you to read from standard input without blocking the current thread. Specifically, it works by firing up another thread to handle the event stream, which will then be buffered in a mpsc queue, which will eventually be read by the current thread.

This will not read the piped standard input, but rather read from the TTY device, since reading asyncronized from piped input would rarely make sense. In other words, if you pipe standard output from another process, it won't be reflected in the stream returned by this function, as this represents the TTY device, and not the piped standard input.