Skip to content

Commit 0fb1f3f

Browse files
committed
Cleanup proc comment in guide-tasks.md.
1 parent dcde1ee commit 0fb1f3f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/doc/guide-tasks.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ closure in the new task.
8989
fn print_message() { println!("I am running in a different task!"); }
9090
spawn(print_message);
9191
92-
// Print something more profound in a different task using a lambda expression
93-
// This uses the proc() keyword to assign to spawn a function with no name
94-
// That function will call println!(...) as requested
92+
// Print something profound in a different task using a `proc` expression
93+
// The `proc` expression evaluates to an (unnamed) owned closure.
94+
// That closure will call `println!(...)` when the spawned task runs.
95+
9596
spawn(proc() println!("I am also running in a different task!") );
9697
~~~~
9798

0 commit comments

Comments
 (0)