diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-08-29 14:20:48 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-08-29 14:23:44 -0700 |
| commit | 3c5a43e5b6f857c71c6f66dbbd640a47d34a0e7e (patch) | |
| tree | c2bf9ab63ff4c20dbe5a43660fdd919ae822c9b9 /src/libstd/rt/rtio.rs | |
| parent | 698873e3a829d764b451f657178403c704044721 (diff) | |
| download | rust-3c5a43e5b6f857c71c6f66dbbd640a47d34a0e7e.tar.gz rust-3c5a43e5b6f857c71c6f66dbbd640a47d34a0e7e.zip | |
Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"
This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562. Conflicts: mk/rt.mk src/libuv
Diffstat (limited to 'src/libstd/rt/rtio.rs')
| -rw-r--r-- | src/libstd/rt/rtio.rs | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/libstd/rt/rtio.rs b/src/libstd/rt/rtio.rs index 1a7ef6ea309..1788b7a04e3 100644 --- a/src/libstd/rt/rtio.rs +++ b/src/libstd/rt/rtio.rs @@ -8,14 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use libc; use option::*; use result::*; use libc::c_int; use rt::io::IoError; use super::io::net::ip::{IpAddr, SocketAddr}; -use rt::uv; use rt::uv::uvio; use path::Path; use super::io::support::PathLike; @@ -32,9 +30,6 @@ pub type RtioTcpListenerObject = uvio::UvTcpListener; pub type RtioUdpSocketObject = uvio::UvUdpSocket; pub type RtioTimerObject = uvio::UvTimer; pub type PausibleIdleCallback = uvio::UvPausibleIdleCallback; -pub type RtioPipeObject = uvio::UvPipeStream; -pub type RtioProcessObject = uvio::UvProcess; -pub type RtioProcessConfig<'self> = uv::process::Config<'self>; pub trait EventLoop { fn run(&mut self); @@ -77,13 +72,6 @@ pub trait IoFactory { fn fs_open<P: PathLike>(&mut self, path: &P, fm: FileMode, fa: FileAccess) -> Result<~RtioFileStream, IoError>; fn fs_unlink<P: PathLike>(&mut self, path: &P) -> Result<(), IoError>; - fn pipe_init(&mut self, ipc: bool) -> Result<~RtioPipeObject, IoError>; - fn spawn(&mut self, config: &RtioProcessConfig) -> Result<~RtioProcessObject, IoError>; -} - -pub trait RtioStream { - fn read(&mut self, buf: &mut [u8]) -> Result<uint, IoError>; - fn write(&mut self, buf: &[u8]) -> Result<(), IoError>; } pub trait RtioTcpListener : RtioSocket { @@ -92,7 +80,9 @@ pub trait RtioTcpListener : RtioSocket { fn dont_accept_simultaneously(&mut self) -> Result<(), IoError>; } -pub trait RtioTcpStream : RtioSocket + RtioStream { +pub trait RtioTcpStream : RtioSocket { + fn read(&mut self, buf: &mut [u8]) -> Result<uint, IoError>; + fn write(&mut self, buf: &[u8]) -> Result<(), IoError>; fn peer_name(&mut self) -> Result<SocketAddr, IoError>; fn control_congestion(&mut self) -> Result<(), IoError>; fn nodelay(&mut self) -> Result<(), IoError>; @@ -134,9 +124,3 @@ pub trait RtioFileStream { fn tell(&self) -> Result<u64, IoError>; fn flush(&mut self) -> Result<(), IoError>; } - -pub trait RtioProcess { - fn id(&self) -> libc::pid_t; - fn kill(&mut self, signal: int) -> Result<(), IoError>; - fn wait(&mut self) -> int; -} |
