File tree 4 files changed +8
-7
lines changed
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>;
1229
1229
pub type PortOne < T : Owned > = oneshot:: server:: Oneshot < T > ;
1230
1230
1231
1231
/// 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)
1234
1235
}
1235
1236
1236
1237
/**
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>)
424
424
425
425
do task:: unkillable {
426
426
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
429
429
let server: UnwrapProto = ~mut Some ( ( move c1, move p2) ) ;
430
430
let serverp: int = cast:: transmute( move server) ;
431
431
// 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 {
512
512
fn test_mutex_arc_condvar ( ) {
513
513
let arc = ~MutexARC ( false ) ;
514
514
let arc2 = ~arc. clone ( ) ;
515
- let ( c , p ) = pipes:: oneshot ( ) ;
515
+ let ( p , c ) = pipes:: oneshot ( ) ;
516
516
let ( c, p) = ( ~mut Some ( move c) , ~mut Some ( move p) ) ;
517
517
do task:: spawn |move arc2, move p| {
518
518
// wait until parent gets in
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ impl<Q: Owned> &Sem<Q> {
109
109
state. count -= 1 ;
110
110
if state. count < 0 {
111
111
// Create waiter nobe.
112
- let ( SignalEnd , WaitEnd ) = pipes:: oneshot ( ) ;
112
+ let ( WaitEnd , SignalEnd ) = pipes:: oneshot ( ) ;
113
113
// Tell outer scope we need to block.
114
114
waiter_nobe = Some ( move WaitEnd ) ;
115
115
// Enqueue ourself.
@@ -216,7 +216,7 @@ impl &Condvar {
216
216
*/
217
217
fn wait_on ( condvar_id : uint ) {
218
218
// Create waiter nobe.
219
- let ( SignalEnd , WaitEnd ) = pipes:: oneshot ( ) ;
219
+ let ( WaitEnd , SignalEnd ) = pipes:: oneshot ( ) ;
220
220
let mut WaitEnd = Some ( move WaitEnd ) ;
221
221
let mut SignalEnd = Some ( move SignalEnd ) ;
222
222
let mut reacquire = None ;
You can’t perform that action at this time.
0 commit comments