File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -21,27 +21,3 @@ pub struct NominalOp<T> {
21
21
impl < T : Copy > NominalOp < T > : Clone {
22
22
fn clone ( & self ) -> NominalOp < T > { copy * self }
23
23
}
24
-
25
- pub fn spawn_listener< A : Owned > (
26
- f : fn ~( oldcomm:: Port < A > ) ) -> oldcomm:: Chan < A > {
27
- let setup_po = oldcomm:: Port ( ) ;
28
- let setup_ch = oldcomm:: Chan ( & setup_po) ;
29
- do task:: spawn |move f| {
30
- let po = oldcomm:: Port ( ) ;
31
- let ch = oldcomm:: Chan ( & po) ;
32
- oldcomm:: send ( setup_ch, ch) ;
33
- f ( move po) ;
34
- }
35
- oldcomm:: recv ( setup_po)
36
- }
37
-
38
- pub fn spawn_conversation < A : Owned , B : Owned >
39
- ( f : fn ~( oldcomm:: Port < A > , oldcomm:: Chan < B > ) )
40
- -> ( oldcomm:: Port < B > , oldcomm:: Chan < A > ) {
41
- let from_child = oldcomm:: Port ( ) ;
42
- let to_parent = oldcomm:: Chan ( & from_child) ;
43
- let to_child = do spawn_listener |move f, from_parent| {
44
- f ( from_parent, to_parent)
45
- } ;
46
- ( from_child, to_child)
47
- }
You can’t perform that action at this time.
0 commit comments