Skip to content

Commit

Permalink
auto merge of rust-lang#7883 : brson/rust/rm-std-net, r=graydon
Browse files Browse the repository at this point in the history
This removes all the code from libextra that depends on libuv. After that it removes three runtime features that existed to support the global uv loop: weak tasks, runtime-global variables, and at_exit handlers.

The networking code doesn't have many users besides servo, so shouldn't have much fallout. The timer code though is useful and will probably break out-of-tree code until the new scheduler lands, but I expect that to be soon.

It also incidentally moves `os::change_dir_locked` to `std::unstable`. This is a function used by test cases to avoid cwd races and in my opinion shouldn't be public (rust-lang#7870).

Closes rust-lang#7251 and rust-lang#7870
  • Loading branch information
bors committed Jul 22, 2013
2 parents 9ed82fb + 407bffb commit 73921f9
Show file tree
Hide file tree
Showing 27 changed files with 83 additions and 5,978 deletions.
15 changes: 1 addition & 14 deletions src/libextra/extra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,9 @@ use std::str::{StrSlice, OwnedStr};

pub use std::os;

pub mod uv_ll;

// General io and system-services modules

#[path = "net/mod.rs"]
pub mod net;

// libuv modules
pub mod uv;
pub mod uv_iotask;
pub mod uv_global_loop;


// Utility modules

pub mod c_vec;
pub mod timer;
pub mod io_util;
pub mod rc;

Expand Down Expand Up @@ -90,6 +76,7 @@ pub mod sha2;

// And ... other stuff

pub mod url;
pub mod ebml;
pub mod dbg;
pub mod getopts;
Expand Down
7 changes: 4 additions & 3 deletions src/libextra/flatpipes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,6 @@ mod test {
use flatpipes::serial;
use io_util::BufReader;
use flatpipes::{BytePort, FlatChan, FlatPort};
use net::tcp::TcpSocketBuf;

use std::comm;
use std::int;
Expand Down Expand Up @@ -728,7 +727,8 @@ mod test {
}

// FIXME #2064: Networking doesn't work on x86
#[test]
// XXX Broken until networking support is added back
/*#[test]
#[cfg(target_arch = "x86_64")]
fn test_pod_tcp_stream() {
fn reader_port(buf: TcpSocketBuf
Expand All @@ -745,6 +745,7 @@ mod test {
#[test]
#[cfg(target_arch = "x86_64")]
fn test_serializing_tcp_stream() {
// XXX Broken until networking support is added back
fn reader_port(buf: TcpSocketBuf
) -> serial::ReaderPort<int, TcpSocketBuf> {
serial::reader_port(buf)
Expand Down Expand Up @@ -860,7 +861,7 @@ mod test {
}
finish_port.recv();
}
}*/

// Tests that the different backends behave the same when the
// binary streaming protocol is broken
Expand Down
Loading

0 comments on commit 73921f9

Please sign in to comment.