File tree 1 file changed +7
-9
lines changed
1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 1
- // xfail-test
2
-
1
+ // xfail-win32
3
2
// Create a task that is supervised by another task,
4
3
// join the supervised task from the supervising task,
5
4
// then fail the supervised task. The supervised task
10
9
use std;
11
10
import std:: task;
12
11
13
- fn supervised ( ) {
12
+ fn supervised ( & & _args : ( ) ) {
14
13
// Yield to make sure the supervisor joins before we
15
14
// fail. This is currently not needed because the supervisor
16
15
// runs first, but I can imagine that changing.
17
16
task:: yield ( ) ;
18
17
fail;
19
18
}
20
19
21
- fn supervisor ( ) {
20
+ fn supervisor ( & & _args : ( ) ) {
22
21
// Unsupervise this task so the process doesn't return a failure status as
23
22
// a result of the main task being killed.
24
23
task:: unsupervise ( ) ;
25
24
let f = supervised;
26
- let t = task:: _spawn ( supervised) ;
27
- task:: join_id ( t) ;
25
+ let t = task:: spawn_joinable ( ( ) , supervised) ;
26
+ task:: join ( t) ;
28
27
}
29
28
30
29
fn main ( ) {
31
- let f = supervisor;
32
- let dom2 = task:: _spawn ( f) ;
33
- task:: join_id ( dom2) ;
30
+ let dom2 = task:: spawn_joinable ( ( ) , supervisor) ;
31
+ task:: join ( dom2) ;
34
32
}
35
33
36
34
// Local Variables:
You can’t perform that action at this time.
0 commit comments