@@ -45,7 +45,6 @@ export add_wrapper;
45
45
export run;
46
46
47
47
export future_result;
48
- export future_task;
49
48
export unsupervise;
50
49
export run_listener;
51
50
export run_with;
@@ -464,30 +463,6 @@ fn future_result(builder: builder) -> future::future<task_result> {
464
463
}
465
464
}
466
465
467
- fn future_task ( builder : builder ) -> future:: future < task > {
468
- //! Get a future representing the handle to the new task
469
-
470
- import future:: future_pipe;
471
-
472
- let ( po, ch) = future_pipe:: init ( ) ;
473
-
474
- let ch = ~mut some ( ch) ;
475
-
476
- do add_wrapper ( builder) |body, move ch| {
477
- let ch = { let mut t = none;
478
- t <-> * ch;
479
- ~mut t} ;
480
- fn ~( move ch) {
481
- let mut po = none;
482
- po <-> * ch;
483
- future_pipe:: server:: completed ( option:: unwrap ( po) ,
484
- get_task ( ) ) ;
485
- body ( ) ;
486
- }
487
- }
488
- future:: from_port ( po)
489
- }
490
-
491
466
fn unsupervise ( builder : builder ) {
492
467
//! Configures the new task to not propagate failure to its parent
493
468
@@ -1476,16 +1451,6 @@ fn test_future_result() {
1476
1451
assert future:: get ( option:: unwrap ( result) ) == failure;
1477
1452
}
1478
1453
1479
- #[ test]
1480
- fn test_future_task ( ) {
1481
- let po = comm:: port ( ) ;
1482
- let ch = comm:: chan ( po) ;
1483
- let buildr = builder ( ) ;
1484
- let task1 = future_task ( buildr) ;
1485
- do run( buildr) { comm:: send ( ch, get_task ( ) ) }
1486
- assert future:: get ( task1) == comm:: recv ( po) ;
1487
- }
1488
-
1489
1454
#[ test]
1490
1455
fn test_spawn_listiner_bidi ( ) {
1491
1456
let po = comm:: port ( ) ;
@@ -1700,17 +1665,6 @@ fn test_avoid_copying_the_body_try() {
1700
1665
}
1701
1666
}
1702
1667
1703
- #[test]
1704
- fn test_avoid_copying_the_body_future_task() {
1705
- do avoid_copying_the_body |f| {
1706
- let buildr = builder();
1707
- future_task(buildr);
1708
- do run(buildr) {
1709
- f();
1710
- }
1711
- }
1712
- }
1713
-
1714
1668
#[test]
1715
1669
fn test_avoid_copying_the_body_unlinked() {
1716
1670
do avoid_copying_the_body |f| {
0 commit comments