File tree 1 file changed +6
-10
lines changed
1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 1
1
// -*- rust -*-
2
2
// error-pattern:1 == 2
3
- // xfail-test Been deadlocking on mac
4
3
use std;
5
4
import std:: task;
6
5
import std:: comm:: chan;
7
6
import std:: comm:: port;
8
7
import std:: comm:: recv;
9
8
10
- fn child ( ) { assert ( 1 == 2 ) ; }
9
+ fn child ( & & _args : ( ) ) { assert ( 1 == 2 ) ; }
11
10
12
- fn parent ( ) {
11
+ fn parent ( & & _args : ( ) ) {
13
12
let p = port :: < int > ( ) ;
14
- let f = child;
15
- task:: spawn ( f) ;
13
+ task:: spawn ( ( ) , child) ;
16
14
let x = recv ( p) ;
17
15
}
18
16
19
17
// This task is not linked to the failure chain, but since the other
20
18
// tasks are going to fail the kernel, this one will fail too
21
- fn sleeper ( ) {
19
+ fn sleeper ( & & _args : ( ) ) {
22
20
let p = port :: < int > ( ) ;
23
21
let x = recv ( p) ;
24
22
}
25
23
26
24
fn main ( ) {
27
- let g = sleeper;
28
- task:: spawn ( g) ;
29
- let f = parent;
30
- task:: spawn ( f) ;
25
+ task:: spawn ( ( ) , sleeper) ;
26
+ task:: spawn ( ( ) , parent) ;
31
27
}
You can’t perform that action at this time.
0 commit comments