File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 1- // xfail-test
2-
1+ // xfail-win32
32// Create a task that is supervised by another task,
43// join the supervised task from the supervising task,
54// then fail the supervised task. The supervised task
109use std;
1110import std:: task;
1211
13- fn supervised ( ) {
12+ fn supervised ( & & _args : ( ) ) {
1413 // Yield to make sure the supervisor joins before we
1514 // fail. This is currently not needed because the supervisor
1615 // runs first, but I can imagine that changing.
1716 task:: yield ( ) ;
1817 fail;
1918}
2019
21- fn supervisor ( ) {
20+ fn supervisor ( & & _args : ( ) ) {
2221 // Unsupervise this task so the process doesn't return a failure status as
2322 // a result of the main task being killed.
2423 task:: unsupervise ( ) ;
2524 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) ;
2827}
2928
3029fn 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) ;
3432}
3533
3634// Local Variables:
You can’t perform that action at this time.
0 commit comments