Skip to content

Instantly share code, notes, and snippets.

Created December 28, 2013 18:16
Show Gist options
  • Select an option

  • Save anonymous/8162372 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/8162372 to your computer and use it in GitHub Desktop.
#[no_uv];
extern mod green;
extern mod rustuv; // pull in I/O support
#[start]
fn start(argc: int, argv: **u8) -> int {
do green::start(argc, argv) {
main();
}
}
// This is running in a green thread
fn main() {}
#[no_uv];
extern mod native;
#[start]
fn start(argc: int, argv: **u8) -> int {
do native::start(argc, argv) {
main();
}
}
// this is running in a native OS thread
fn main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment