Skip to content

Commit 60b859a

Browse files
committed
Remove all use of librustuv
1 parent 49fcb27 commit 60b859a

26 files changed

+43
-405
lines changed

src/compiletest/compiletest.rs

-10
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,10 @@
1111
#![crate_type = "bin"]
1212
#![feature(phase)]
1313

14-
// we use our own (green) start below; do not link in libnative; issue #13247.
15-
#![no_start]
16-
1714
#![deny(warnings)]
1815

1916
extern crate test;
2017
extern crate getopts;
21-
extern crate green;
22-
extern crate rustuv;
2318
#[phase(plugin, link)] extern crate log;
2419

2520
extern crate regex;
@@ -41,11 +36,6 @@ pub mod runtest;
4136
pub mod common;
4237
pub mod errors;
4338

44-
#[start]
45-
fn start(argc: int, argv: *const *const u8) -> int {
46-
green::start(argc, argv, rustuv::event_loop, main)
47-
}
48-
4939
pub fn main() {
5040
let args = os::args();
5141
let config = parse_config(args);

src/doc/guide-runtime.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ To create a pool of green tasks which have no I/O support, you may shed the
240240
`rustuv::event_loop`. All tasks will have no I/O support, but they will still be
241241
able to deschedule/reschedule (use channels, locks, etc).
242242

243-
~~~{.rust}
243+
~~~{.ignore}
244244
extern crate green;
245245
extern crate rustuv;
246246

src/libgreen/lib.rs

-61
Original file line numberDiff line numberDiff line change
@@ -128,35 +128,6 @@
128128
//! > **Note**: This `main` function in this example does *not* have I/O
129129
//! > support. The basic event loop does not provide any support
130130
//!
131-
//! # Starting with I/O support in libgreen
132-
//!
133-
//! ```rust
134-
//! extern crate green;
135-
//! extern crate rustuv;
136-
//!
137-
//! #[start]
138-
//! fn start(argc: int, argv: *const *const u8) -> int {
139-
//! green::start(argc, argv, rustuv::event_loop, main)
140-
//! }
141-
//!
142-
//! fn main() {
143-
//! // this code is running in a pool of schedulers all powered by libuv
144-
//! }
145-
//! ```
146-
//!
147-
//! The above code can also be shortened with a macro from libgreen.
148-
//!
149-
//! ```
150-
//! #![feature(phase)]
151-
//! #[phase(plugin)] extern crate green;
152-
//!
153-
//! green_start!(main)
154-
//!
155-
//! fn main() {
156-
//! // run inside of a green pool
157-
//! }
158-
//! ```
159-
//!
160131
//! # Using a scheduler pool
161132
//!
162133
//! This library adds a `GreenTaskBuilder` trait that extends the methods
@@ -165,17 +136,13 @@
165136
//!
166137
//! ```rust
167138
//! extern crate green;
168-
//! extern crate rustuv;
169139
//!
170140
//! # fn main() {
171141
//! use std::task::TaskBuilder;
172142
//! use green::{SchedPool, PoolConfig, GreenTaskBuilder};
173143
//!
174144
//! let mut config = PoolConfig::new();
175145
//!
176-
//! // Optional: Set the event loop to be rustuv's to allow I/O to work
177-
//! config.event_loop_factory = rustuv::event_loop;
178-
//!
179146
//! let mut pool = SchedPool::new(config);
180147
//!
181148
//! // Spawn tasks into the pool of schedulers
@@ -221,7 +188,6 @@
221188
#![allow(deprecated)]
222189

223190
#[cfg(test)] #[phase(plugin, link)] extern crate log;
224-
#[cfg(test)] extern crate rustuv;
225191
extern crate libc;
226192
extern crate alloc;
227193

@@ -253,33 +219,6 @@ pub mod sleeper_list;
253219
pub mod stack;
254220
pub mod task;
255221

256-
/// A helper macro for booting a program with libgreen
257-
///
258-
/// # Example
259-
///
260-
/// ```
261-
/// #![feature(phase)]
262-
/// #[phase(plugin)] extern crate green;
263-
///
264-
/// green_start!(main)
265-
///
266-
/// fn main() {
267-
/// // running with libgreen
268-
/// }
269-
/// ```
270-
#[macro_export]
271-
macro_rules! green_start( ($f:ident) => (
272-
mod __start {
273-
extern crate green;
274-
extern crate rustuv;
275-
276-
#[start]
277-
fn start(argc: int, argv: *const *const u8) -> int {
278-
green::start(argc, argv, rustuv::event_loop, super::$f)
279-
}
280-
}
281-
) )
282-
283222
/// Set up a default runtime configuration, given compiler-supplied arguments.
284223
///
285224
/// This function will block until the entire pool of M:N schedulers have

src/libgreen/sched.rs

-24
Original file line numberDiff line numberDiff line change
@@ -1024,8 +1024,6 @@ fn new_sched_rng() -> XorShiftRng {
10241024

10251025
#[cfg(test)]
10261026
mod test {
1027-
use rustuv;
1028-
10291027
use std::rt::task::TaskOpts;
10301028
use std::rt::task::Task;
10311029
use std::rt::local::Local;
@@ -1277,28 +1275,6 @@ mod test {
12771275
// }
12781276
//}
12791277

1280-
#[test]
1281-
fn test_io_callback() {
1282-
use std::io::timer;
1283-
1284-
let mut pool = SchedPool::new(PoolConfig {
1285-
threads: 2,
1286-
event_loop_factory: rustuv::event_loop,
1287-
});
1288-
1289-
// This is a regression test that when there are no schedulable tasks in
1290-
// the work queue, but we are performing I/O, that once we do put
1291-
// something in the work queue again the scheduler picks it up and
1292-
// doesn't exit before emptying the work queue
1293-
pool.spawn(TaskOpts::new(), proc() {
1294-
spawn(proc() {
1295-
timer::sleep(Duration::milliseconds(10));
1296-
});
1297-
});
1298-
1299-
pool.shutdown();
1300-
}
1301-
13021278
#[test]
13031279
fn wakeup_across_scheds() {
13041280
let (tx1, rx1) = channel();

src/libgreen/task.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ mod tests {
506506
fn spawn_opts(opts: TaskOpts, f: proc():Send) {
507507
let mut pool = SchedPool::new(PoolConfig {
508508
threads: 1,
509-
event_loop_factory: ::rustuv::event_loop,
509+
event_loop_factory: super::super::basic::event_loop,
510510
});
511511
pool.spawn(opts, f);
512512
pool.shutdown();

src/libstd/lib.rs

-11
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@
116116

117117
#![reexport_test_harness_main = "test_main"]
118118

119-
// When testing libstd, bring in libuv as the I/O backend so tests can print
120-
// things and all of the std::io tests have an I/O interface to run on top
121-
// of
122-
#[cfg(test)] extern crate rustuv;
123-
#[cfg(test)] extern crate native;
124119
#[cfg(test)] extern crate green;
125120
#[cfg(test)] extern crate debug;
126121
#[cfg(test)] #[phase(plugin, link)] extern crate log;
@@ -187,12 +182,6 @@ pub use unicode::char;
187182

188183
pub use core_sync::comm;
189184

190-
// Run tests with libgreen instead of libnative.
191-
#[cfg(test)] #[start]
192-
fn start(argc: int, argv: *const *const u8) -> int {
193-
green::start(argc, argv, rustuv::event_loop, test_main)
194-
}
195-
196185
/* Exported macros */
197186

198187
pub mod macros;

src/test/bench/rt-spawn-rate.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#![no_start]
1212

1313
extern crate green;
14-
extern crate rustuv;
1514

1615
use std::task::spawn;
1716
use std::os;
@@ -22,7 +21,7 @@ use std::uint;
2221

2322
#[start]
2423
fn start(argc: int, argv: *const *const u8) -> int {
25-
green::start(argc, argv, rustuv::event_loop, main)
24+
green::start(argc, argv, green::basic::event_loop, main)
2625
}
2726

2827
fn main() {

src/test/bench/shootout-chameneos-redux.rs

-5
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,9 @@
4040

4141
// no-pretty-expanded
4242

43-
#![feature(phase)]
44-
#[phase(plugin)] extern crate green;
45-
4643
use std::string::String;
4744
use std::fmt;
4845

49-
green_start!(main)
50-
5146
fn print_complements() {
5247
let all = [Blue, Red, Yellow];
5348
for aa in all.iter() {

src/test/bench/shootout-meteor.rs

-5
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,8 @@
4040

4141
// no-pretty-expanded FIXME #15189
4242

43-
#![feature(phase)]
44-
#[phase(plugin)] extern crate green;
45-
4643
use std::sync::Arc;
4744

48-
green_start!(main)
49-
5045
//
5146
// Utilities.
5247
//

src/test/bench/shootout-spectralnorm.rs

-4
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,14 @@
4040

4141
// no-pretty-expanded FIXME #15189
4242

43-
#![feature(phase)]
4443
#![allow(non_snake_case)]
45-
#[phase(plugin)] extern crate green;
4644

4745
use std::from_str::FromStr;
4846
use std::iter::count;
4947
use std::cmp::min;
5048
use std::os;
5149
use std::sync::{Arc, RWLock};
5250

53-
green_start!(main)
54-
5551
fn A(i: uint, j: uint) -> f64 {
5652
((i + j) * (i + j + 1) / 2 + i + 1) as f64
5753
}

src/test/bench/shootout-threadring.rs

-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
3939
// OF THE POSSIBILITY OF SUCH DAMAGE.
4040

41-
#![feature(phase)]
42-
#[phase(plugin)] extern crate green;
43-
green_start!(main)
44-
4541
fn start(n_tasks: int, token: int) {
4642
let (tx, mut rx) = channel();
4743
tx.send(token);

src/test/bench/silly-test-spawn.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@
99
// except according to those terms.
1010

1111
// This is (hopefully) a quick test to get a good idea about spawning
12-
// performance in libgreen. Note that this uses the rustuv event loop rather
13-
// than the basic event loop in order to get a better real world idea about the
14-
// performance of a task spawn.
12+
// performance in libgreen.
1513

1614
extern crate green;
17-
extern crate rustuv;
1815

1916
#[start]
2017
fn start(argc: int, argv: *const *const u8) -> int {
21-
green::start(argc, argv, rustuv::event_loop, main)
18+
green::start(argc, argv, green::basic::event_loop, main)
2219
}
2320

2421
fn main() {

src/test/run-make/bootstrap-from-c-with-green/Makefile

-12
This file was deleted.

src/test/run-make/bootstrap-from-c-with-green/lib.rs

-24
This file was deleted.

src/test/run-make/bootstrap-from-c-with-green/main.c

-16
This file was deleted.

0 commit comments

Comments
 (0)