auto merge of #13946 : pnkfelix/rust/fsk-cleanup-proc-comment-in-guide-tasks, r=alexcrichton

Followup to some recent feedback in PR #13676.
This commit is contained in:
bors 2014-05-05 19:56:33 -07:00
commit a1ca57237b
1 changed files with 4 additions and 3 deletions

View File

@ -89,9 +89,10 @@ closure in the new task.
fn print_message() { println!("I am running in a different task!"); }
spawn(print_message);
// Print something more profound in a different task using a lambda expression
// This uses the proc() keyword to assign to spawn a function with no name
// That function will call println!(...) as requested
// Print something profound in a different task using a `proc` expression
// The `proc` expression evaluates to an (unnamed) owned closure.
// That closure will call `println!(...)` when the spawned task runs.
spawn(proc() println!("I am also running in a different task!") );
~~~~