File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -1229,8 +1229,9 @@ pub type ChanOne<T: Owned> = oneshot::client::Oneshot<T>;
12291229pub type PortOne < T : Owned > = oneshot:: server:: Oneshot < T > ;
12301230
12311231/// Initialiase a (send-endpoint, recv-endpoint) oneshot pipe pair.
1232- pub fn oneshot < T : Owned > ( ) -> ( ChanOne < T > , PortOne < T > ) {
1233- oneshot:: init ( )
1232+ pub fn oneshot < T : Owned > ( ) -> ( PortOne < T > , ChanOne < T > ) {
1233+ let ( chan, port) = oneshot:: init ( ) ;
1234+ ( port, chan)
12341235}
12351236
12361237/**
Original file line number Diff line number Diff line change @@ -424,8 +424,8 @@ pub unsafe fn unwrap_shared_mutable_state<T: Owned>(rc: SharedMutableState<T>)
424424
425425 do task:: unkillable {
426426 let ptr: ~ArcData <T > = cast:: reinterpret_cast( & rc. data) ;
427- let ( c1 , p1 ) = pipes:: oneshot( ) ; // ()
428- let ( c2 , p2 ) = pipes:: oneshot( ) ; // bool
427+ let ( p1 , c1 ) = pipes:: oneshot( ) ; // ()
428+ let ( p2 , c2 ) = pipes:: oneshot( ) ; // bool
429429 let server: UnwrapProto = ~mut Some ( ( move c1, move p2) ) ;
430430 let serverp: int = cast:: transmute( move server) ;
431431 // Try to put our server end in the unwrapper slot.
Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ mod tests {
512512 fn test_mutex_arc_condvar ( ) {
513513 let arc = ~MutexARC ( false ) ;
514514 let arc2 = ~arc. clone ( ) ;
515- let ( c , p ) = pipes:: oneshot ( ) ;
515+ let ( p , c ) = pipes:: oneshot ( ) ;
516516 let ( c, p) = ( ~mut Some ( move c) , ~mut Some ( move p) ) ;
517517 do task:: spawn |move arc2, move p| {
518518 // wait until parent gets in
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ impl<Q: Owned> &Sem<Q> {
109109 state. count -= 1 ;
110110 if state. count < 0 {
111111 // Create waiter nobe.
112- let ( SignalEnd , WaitEnd ) = pipes:: oneshot ( ) ;
112+ let ( WaitEnd , SignalEnd ) = pipes:: oneshot ( ) ;
113113 // Tell outer scope we need to block.
114114 waiter_nobe = Some ( move WaitEnd ) ;
115115 // Enqueue ourself.
@@ -216,7 +216,7 @@ impl &Condvar {
216216 */
217217 fn wait_on ( condvar_id : uint ) {
218218 // Create waiter nobe.
219- let ( SignalEnd , WaitEnd ) = pipes:: oneshot ( ) ;
219+ let ( WaitEnd , SignalEnd ) = pipes:: oneshot ( ) ;
220220 let mut WaitEnd = Some ( move WaitEnd ) ;
221221 let mut SignalEnd = Some ( move SignalEnd ) ;
222222 let mut reacquire = None ;
You can’t perform that action at this time.
0 commit comments