We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b75683c commit ad0cdd7Copy full SHA for ad0cdd7
src/doc/guide-tasks.md
@@ -101,6 +101,8 @@ fn print_message() { println!("I am running in a different task!"); }
101
spawn(print_message);
102
103
// Print something more profound in a different task using a lambda expression
104
+// This uses the proc() keyword to assign to spawn a function with no name
105
+// That function will call println!(...) as requested
106
spawn(proc() println!("I am also running in a different task!") );
107
~~~~
108
0 commit comments