Function termion::async_stdin [] [src]

pub fn async_stdin() -> AsyncReader

Construct an asynchronous handle to the 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.

Note that this will acquire the Mutex lock on the standard input, making all future stdin construction hang the program until the reader is dropped.