File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
- // xfail-stage1
2
- // xfail-stage2
3
- // xfail-stage3
4
-
5
1
use std;
6
2
import std:: comm;
7
3
import std:: task;
8
4
9
- fn start ( c : comm:: _chan < int > , n : int ) {
5
+ fn start ( c : comm:: chan < int > , n : int ) {
10
6
let i: int = n;
11
7
12
8
while i > 0 { comm:: send ( c, 0 ) ; i = i - 1 ; }
13
9
}
14
10
15
11
fn main ( ) {
16
- let p = comm:: mk_port :: < comm :: _chan < int > > ( ) ;
12
+ let p = comm:: mk_port ( ) ;
17
13
// Spawn a task that sends us back messages. The parent task
18
14
// is likely to terminate before the child completes, so from
19
15
// the child's point of view the receiver may die. We should
20
16
// drop messages on the floor in this case, and not crash!
21
- let child = task:: _spawn ( bind start ( p. mk_chan ( ) , 10 ) ) ;
17
+ let child = task:: spawn ( bind start ( p. mk_chan ( ) , 10 ) ) ;
22
18
let c = p. recv ( ) ;
23
19
}
You can’t perform that action at this time.
0 commit comments