await_writable
fn await_writable(Stream s) -> Result<unit, IoError> Import
Source: use io::{await_writable}; compiler/src/builtin_docs/io.hy Older name of wait_writable; behaves exactly the same.
Parameters#
| Name | Type |
|---|---|
s | Stream |
Returns#
Result<unit, IoError>
Examples#
use io::{await_writable, stdout};
use tests::assert;
let ready = match await_writable(stdout()) {
Result::Ok(_) => true,
Result::Err(_) => false,
};
assert!(ready);
See also#
io::wait_writablestdin: Returns a new stream on the process’s standard input.stdout: Returns a new stream on the process’s standard output.stderr: Returns a new stream on the process’s standard error.capture_begin: Starts keeping this thread’s stdout and stderr writes in memory instead of writing them, until the matchingcapture_end().capture_end: Ends the innermostcapture_begin()and returns what it kept, as(stdout, stderr).open: Opens the file atpathwithmodeand returns a stream on it.close: Closess.