]> git.lizzy.rs Git - rust.git/commitdiff
Cleanup proc comment in guide-tasks.md.
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Mon, 5 May 2014 11:24:54 +0000 (13:24 +0200)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Mon, 5 May 2014 11:24:54 +0000 (13:24 +0200)
src/doc/guide-tasks.md

index b7cc85c4c1a8bef4d50569d545f10c0e071f24d4..089f281b392a5ed84f5cf8ce3ba2f82e7b70ea78 100644 (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!") );
 ~~~~