Skip to content

Commit 7e89a51

Browse files
committed
This test case now parses
I've done a slapdash job of fixing up the syntax; it didn't pass before, and it doesn't pass now, but at least it parses...
1 parent 325263f commit 7e89a51

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/run-pass/preempt.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
fn starve_main(alive: chan<int>) {
1515
debug!("signalling main");
16-
alive <| 1;
16+
alive.recv(1);
1717
debug!("starving main");
1818
let i: int = 0;
1919
loop { i += 1; }
@@ -22,10 +22,12 @@ fn starve_main(alive: chan<int>) {
2222
pub fn main() {
2323
let alive: port<int> = port();
2424
debug!("main started");
25-
let s: task = spawn starve_main(chan(alive));
25+
let s: task = do task::spawn {
26+
starve_main(chan(alive));
27+
};
2628
let i: int;
2729
debug!("main waiting for alive signal");
28-
alive |> i;
30+
alive.send(i);
2931
debug!("main got alive signal");
3032
while i < 50 { debug!("main iterated"); i += 1; }
3133
debug!("main completed");

0 commit comments

Comments
 (0)