Skip to content

Commit

Permalink
Updated spawn / loop thread to work with current syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
danluu committed Apr 28, 2013
1 parent 212d77e commit e9814da
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/test/run-pass/infinite-loops.rs
Expand Up @@ -15,16 +15,15 @@
// xfail-test

extern mod std;
use task::join;

fn loop(n: int) {
let t1: task;
let t2: task;

if n > 0 { t1 = spawn loop(n - 1); t2 = spawn loop(n - 1); }


fn loopy(n: int) {
if n > 0 { do spawn { loopy(n - 1) }; do spawn { loopy(n - 1) }; }
loop { }
}

pub fn main() { let t: task = spawn loop(5); join(t); }
pub fn main() {
// Commenting this out, as this will hang forever otherwise.
// Even after seeing the comment above, I'm not sure what the
// intention of this test is.
// do spawn { loopy(5) };
}

5 comments on commit e9814da

@bors
Copy link
Contributor

@bors bors commented on e9814da Apr 29, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on e9814da Apr 29, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging danluu/rust/xfail_clone = e9814da into auto

@bors
Copy link
Contributor

@bors bors commented on e9814da Apr 29, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

danluu/rust/xfail_clone = e9814da merged ok, testing candidate = 76ec35a

@bors
Copy link
Contributor

@bors bors commented on e9814da Apr 29, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on e9814da Apr 29, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = 76ec35a

Please sign in to comment.