Function rustuv::event_loop[src]
pub fn event_loop() -> Box<EventLoop + Send>
Creates a new event loop which is powered by libuv
This function is used in tandem with libgreen's PoolConfig type as a value
for the event_loop_factory field. Using this function as the event loop
factory will power programs with libuv and enable green threading.
Example
extern crate rustuv; extern crate green; #[start] fn start(argc: int, argv: **u8) -> int { green::start(argc, argv, rustuv::event_loop, main) } fn main() { // this code is running inside of a green task powered by libuv }extern crate rustuv; extern crate green; #[start] fn start(argc: int, argv: **u8) -> int { green::start(argc, argv, rustuv::event_loop, main) } fn main() { // this code is running inside of a green task powered by libuv }