File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import either::either;
9
9
import result:: { ok, err} ;
10
10
import io:: writer_util;
11
11
import libc:: size_t;
12
+ import task:: task_builder;
12
13
13
14
export test_name;
14
15
export test_fn;
@@ -392,11 +393,11 @@ fn run_test(+test: test_desc, monitor_ch: comm::chan<monitor_msg>) {
392
393
393
394
do task:: spawn {
394
395
let testfn = copy test. fn ;
395
- let mut builder = task:: builder ( ) ;
396
- let result_future = task:: future_result ( builder ) ;
397
- task :: unsupervise ( builder ) ;
398
- task :: run ( builder , testfn) ;
399
- let task_result = future:: get ( result_future) ;
396
+ let mut result_future = none ; // task::future_result(builder );
397
+ task:: task ( ) . unlinked ( ) . future_result ( |-r| {
398
+ result_future = some ( r ) ;
399
+ } ) . spawn ( testfn) ;
400
+ let task_result = future:: get ( option :: unwrap ( result_future) ) ;
400
401
let test_result = calc_result ( test, task_result == task:: success) ;
401
402
comm:: send ( monitor_ch, ( copy test, test_result) ) ;
402
403
} ;
You can’t perform that action at this time.
0 commit comments