]> git.lizzy.rs Git - rust.git/commit
Make the uv bindings resilient to linked failure
authorAlex Crichton <alex@alexcrichton.com>
Thu, 7 Nov 2013 23:13:06 +0000 (15:13 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 10 Nov 2013 09:37:11 +0000 (01:37 -0800)
commitdf4c0b8e4349d50f317553de5a47d0cd56cdc227
tree470f0312c30becfa07aca3284a200c6d912e876b
parent5e6bbc6bfa82f3ad0a014df24b40cbc042f24035
Make the uv bindings resilient to linked failure

In the ideal world, uv I/O could be canceled safely at any time. In reality,
however, we are unable to do this. Right now linked failure is fairly flaky as
implemented in the runtime, making it very difficult to test whether the linked
failure mechanisms inside of the uv bindings are ready for this kind of
interaction.

Right now, all constructors will execute in a task::unkillable block, and all
homing I/O operations will prevent linked failure in the duration of the homing
operation. What this means is that tasks which perform I/O are still susceptible
to linked failure, but the I/O operations themselves will never get interrupted.
Instead, the linked failure will be received at the edge of the I/O operation.
12 files changed:
src/librustuv/addrinfo.rs
src/librustuv/async.rs
src/librustuv/file.rs
src/librustuv/idle.rs
src/librustuv/lib.rs
src/librustuv/net.rs
src/librustuv/pipe.rs
src/librustuv/process.rs
src/librustuv/stream.rs
src/librustuv/timer.rs
src/librustuv/tty.rs
src/librustuv/uvio.rs