Convert core::pipes to camel case

This commit is contained in:
Brian Anderson 2012-08-28 11:11:15 -07:00
parent e9b7ce6f57
commit cfbc7cbdc7
30 changed files with 318 additions and 236 deletions

View file

@ -11,14 +11,14 @@ Higher level communication abstractions.
// Make sure we follow the new conventions
#[forbid(non_camel_case_types)];
import pipes::{channel, recv, chan, port, selectable};
import pipes::{Channel, Recv, Chan, Port, Selectable};
export DuplexStream;
/// An extension of `pipes::stream` that allows both sending and receiving.
struct DuplexStream<T: send, U: send> : channel<T>, recv<U>, selectable {
priv chan: chan<T>;
priv port: port<U>;
struct DuplexStream<T: send, U: send> : Channel<T>, Recv<U>, Selectable {
priv chan: Chan<T>;
priv port: Port <U>;
fn send(+x: T) {
self.chan.send(x)
@ -40,7 +40,7 @@ struct DuplexStream<T: send, U: send> : channel<T>, recv<U>, selectable {
self.port.peek()
}
pure fn header() -> *pipes::packet_header {
pure fn header() -> *pipes::PacketHeader {
self.port.header()
}
}

View file

@ -19,13 +19,13 @@ import unsafe::{Exclusive, exclusive};
// Each waiting task receives on one of these.
#[doc(hidden)]
type WaitEnd = pipes::port_one<()>;
type WaitEnd = pipes::PortOne<()>;
#[doc(hidden)]
type SignalEnd = pipes::chan_one<()>;
type SignalEnd = pipes::ChanOne<()>;
// A doubly-ended queue of waiting tasks.
#[doc(hidden)]
struct Waitqueue { head: pipes::port<SignalEnd>;
tail: pipes::chan<SignalEnd>; }
struct Waitqueue { head: pipes::Port<SignalEnd>;
tail: pipes::Chan<SignalEnd>; }
fn new_waitqueue() -> Waitqueue {
let (block_tail, block_head) = pipes::stream();
@ -928,8 +928,8 @@ mod tests {
assert woken == 0;
}
struct SendOnFailure {
c: pipes::chan<()>;
new(+c: pipes::chan<()>) { self.c = c; }
c: pipes::Chan<()>;
new(+c: pipes::Chan<()>) { self.c = c; }
drop { self.c.send(()); }
}
}