Skip to content

Commit e3afc78

Browse files
committed
core: Update task spawning example
1 parent 48019c5 commit e3afc78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcore/task.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Tasks may execute in parallel and are scheduled automatically by the runtime.
2121
2222
Example:
2323
24-
> spawn("Hello, World", fn (&&msg: str) {
25-
> log(debug, msg);
26-
> });
24+
> spawn {||
25+
> log(debug, "Hello, World!");
26+
> };
2727
2828
*/
2929
import cast = unsafe::reinterpret_cast;

0 commit comments

Comments
 (0)