diff options
Diffstat (limited to 'src/libgreen/lib.rs')
| -rw-r--r-- | src/libgreen/lib.rs | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/libgreen/lib.rs b/src/libgreen/lib.rs index b5da4dc24bb..7c67a3840b0 100644 --- a/src/libgreen/lib.rs +++ b/src/libgreen/lib.rs @@ -128,35 +128,6 @@ //! > **Note**: This `main` function in this example does *not* have I/O //! > support. The basic event loop does not provide any support //! -//! # Starting with I/O support in libgreen -//! -//! ```rust -//! extern crate green; -//! extern crate rustuv; -//! -//! #[start] -//! fn start(argc: int, argv: *const *const u8) -> int { -//! green::start(argc, argv, rustuv::event_loop, main) -//! } -//! -//! fn main() { -//! // this code is running in a pool of schedulers all powered by libuv -//! } -//! ``` -//! -//! The above code can also be shortened with a macro from libgreen. -//! -//! ``` -//! #![feature(phase)] -//! #[phase(plugin)] extern crate green; -//! -//! green_start!(main) -//! -//! fn main() { -//! // run inside of a green pool -//! } -//! ``` -//! //! # Using a scheduler pool //! //! This library adds a `GreenTaskBuilder` trait that extends the methods @@ -165,7 +136,6 @@ //! //! ```rust //! extern crate green; -//! extern crate rustuv; //! //! # fn main() { //! use std::task::TaskBuilder; @@ -173,9 +143,6 @@ //! //! let mut config = PoolConfig::new(); //! -//! // Optional: Set the event loop to be rustuv's to allow I/O to work -//! config.event_loop_factory = rustuv::event_loop; -//! //! let mut pool = SchedPool::new(config); //! //! // Spawn tasks into the pool of schedulers @@ -221,7 +188,6 @@ #![allow(deprecated)] #[cfg(test)] #[phase(plugin, link)] extern crate log; -#[cfg(test)] extern crate rustuv; extern crate libc; extern crate alloc; @@ -253,33 +219,6 @@ pub mod sleeper_list; pub mod stack; pub mod task; -/// A helper macro for booting a program with libgreen -/// -/// # Example -/// -/// ``` -/// #![feature(phase)] -/// #[phase(plugin)] extern crate green; -/// -/// green_start!(main) -/// -/// fn main() { -/// // running with libgreen -/// } -/// ``` -#[macro_export] -macro_rules! green_start( ($f:ident) => ( - mod __start { - extern crate green; - extern crate rustuv; - - #[start] - fn start(argc: int, argv: *const *const u8) -> int { - green::start(argc, argv, rustuv::event_loop, super::$f) - } - } -) ) - /// Set up a default runtime configuration, given compiler-supplied arguments. /// /// This function will block until the entire pool of M:N schedulers have |
