Skip to content

Commit

Permalink
auto merge of #13946 : pnkfelix/rust/fsk-cleanup-proc-comment-in-guid…
Browse files Browse the repository at this point in the history
…e-tasks, r=alexcrichton

Followup to some recent feedback in PR #13676.
  • Loading branch information
bors committed May 6, 2014
2 parents acf9d42 + 0fb1f3f commit a1ca572
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/doc/guide-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!") );
~~~~

Expand Down

0 comments on commit a1ca572

Please sign in to comment.