We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 212d77e commit e9814daCopy full SHA for e9814da
src/test/run-pass/infinite-loops.rs
@@ -15,16 +15,15 @@
15
// xfail-test
16
17
extern mod std;
18
-use task::join;
19
-
20
-fn loop(n: int) {
21
- let t1: task;
22
- let t2: task;
23
24
- if n > 0 { t1 = spawn loop(n - 1); t2 = spawn loop(n - 1); }
25
26
+fn loopy(n: int) {
+ if n > 0 { do spawn { loopy(n - 1) }; do spawn { loopy(n - 1) }; }
27
loop { }
28
}
29
30
-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) };
+}
0 commit comments