Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/libgreen/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,18 @@
//! possibly pinned to a particular scheduler thread:
//!
//! ```rust
//! extern crate green;
//! extern crate rustuv;
//!
//! # fn main() {
//! use std::task::TaskBuilder;
//! use green::{SchedPool, PoolConfig, GreenTaskBuilder};
//!
//! let config = PoolConfig::new();
//! 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
Expand Down Expand Up @@ -195,6 +203,7 @@
//! // Required to shut down this scheduler pool.
//! // The task will fail if `shutdown` is not called.
//! pool.shutdown();
//! # }
//! ```

#![crate_name = "green"]
Expand Down