Function in io compiler

wait_ready

fn wait_ready() -> int
Import
use io::{wait_ready};
Source: compiler/src/builtin_docs/io.hy

Deprecated: waits until any registered IO waiter is ready and returns how many became ready.

Calling it gives warning E0129. Run concurrent IO as tasks instead (task::scope with spawn and join): an IO wait inside a task suspends only that task.

Returns#

int

Examples#

use io::{wait_ready};
let ready = wait_ready(); // warning E0129: `wait_ready` is deprecated

See also#

  • task::scope
  • stdin: 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 matching capture_end().
  • capture_end: Ends the innermost capture_begin() and returns what it kept, as (stdout, stderr).
  • open: Opens the file at path with mode and returns a stream on it.
  • close: Closes s.
↑ ↓ navigate ↵ open