]> git.lizzy.rs Git - rust.git/commit
Move as much I/O as possible off of native::io
authorAlex Crichton <alex@alexcrichton.com>
Fri, 18 Oct 2013 00:04:51 +0000 (17:04 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 24 Oct 2013 21:21:57 +0000 (14:21 -0700)
commit4eb53360541baf3e6df36dc0f0766bc7c1c9f8be
tree0b78ce834f9df44297595d66b38883831811b99f
parent4ce71eaca34526d0e3ee1ebf0658d2a20d388ef2
Move as much I/O as possible off of native::io

When uv's TTY I/O is used for the stdio streams, the file descriptors are put
into a non-blocking mode. This means that other concurrent writes to the same
stream can fail with EAGAIN or EWOULDBLOCK. By all I/O to event-loop I/O, we
avoid this error.

There is one location which cannot move, which is the runtime's dumb_println
function. This was implemented to handle the EAGAIN and EWOULDBLOCK errors and
simply retry again and again.
13 files changed:
src/libstd/logging.rs
src/libstd/rt/io/mod.rs
src/libstd/rt/io/native/file.rs
src/libstd/rt/io/stdio.rs
src/libstd/rt/logging.rs
src/libstd/rt/rtio.rs
src/libstd/rt/task.rs
src/libstd/rt/util.rs
src/libstd/rt/uv/mod.rs
src/libstd/rt/uv/uvio.rs
src/libstd/rt/uv/uvll.rs
src/rt/rust_uv.cpp
src/rt/rustrt.def.in