Skip to content

Commit 881421e

Browse files
committed
---
yaml --- r: 14763 b: refs/heads/try c: 57af1e9 h: refs/heads/master i: 14761: 86743e9 14759: 193e97c v: v3
1 parent 5e0a1f4 commit 881421e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 91b988ea45c68e2cf9d20163fb496160855aa5d8
5+
refs/heads/try: 57af1e9f67082e41e62aa977754f2df5f78e403c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/doc/tutorial.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,8 +2385,7 @@ The argument to `task::spawn()` is a [unique
23852385
closure](#unique-closures) of type `fn~()`, meaning that it takes no
23862386
arguments and generates no return value. The effect of `task::spawn()`
23872387
is to fire up a child task that will execute the closure in parallel
2388-
with the creator. The result is a task id, here stored into the
2389-
variable `child_task`.
2388+
with the creator.
23902389

23912390
## Ports and channels
23922391

@@ -2402,10 +2401,10 @@ in parallel. We might write something like:
24022401
# fn some_other_expensive_computation() {}
24032402
let port = comm::port::<int>();
24042403
let chan = comm::chan::<int>(port);
2405-
let child_task = task::spawn {||
2404+
task::spawn {||
24062405
let result = some_expensive_computation();
24072406
comm::send(chan, result);
2408-
};
2407+
}
24092408
some_other_expensive_computation();
24102409
let result = comm::recv(port);
24112410
~~~~
@@ -2433,10 +2432,10 @@ The next statement actually spawns the child:
24332432
# fn some_expensive_computation() -> int { 42 }
24342433
# let port = comm::port::<int>();
24352434
# let chan = comm::chan::<int>(port);
2436-
let child_task = task::spawn {||
2435+
task::spawn {||
24372436
let result = some_expensive_computation();
24382437
comm::send(chan, result);
2439-
};
2438+
}
24402439
~~~~
24412440

24422441
This child will perform the expensive computation send the result

0 commit comments

Comments
 (0)