Skip to content

Commit b19c644

Browse files
committed
auto merge of #5921 : brson/rust/pipes, r=brson
This builds on #5909. I've been combing through the pipes code to understand it and started refactoring a bit. * Removes pipes::spawn_* functions. These are not particularly useful since they deal with low-level pipes types. * Inlines the protocol-compiled definitions of `oneshot` and `streamp`. These are the only two uses of the protocol compiler in core and I'm inlining them so I can understand what they are doing as I work on pipes. I may un-inline them in the future. * Removes redundant functions from core::comm * Change the constructors to use the `new` convention
2 parents 2a86485 + decd390 commit b19c644

37 files changed

+511
-434
lines changed

doc/tutorial-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Instead we can use a `SharedChan`, a type that allows a single
236236
use core::comm::{stream, SharedChan};
237237
238238
let (port, chan) = stream();
239-
let chan = SharedChan(chan);
239+
let chan = SharedChan::new(chan);
240240
241241
for uint::range(0, 3) |init_val| {
242242
// Create a new channel handle to distribute to the child task

src/compiletest/procsrv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub fn run(lib_path: ~str,
7373
7474
7575
writeclose(pipe_in.out, input);
76-
let p = comm::PortSet();
76+
let p = comm::PortSet::new();
7777
let ch = p.chan();
7878
do task::spawn_sched(task::SingleThreaded) || {
7979
let errput = readclose(pipe_err.in);

0 commit comments

Comments
 (0)