about summary refs log tree commit diff
path: root/src/libcore/task/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/task/mod.rs')
-rw-r--r--src/libcore/task/mod.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs
index d57bd5528bc..8eb166c6ef2 100644
--- a/src/libcore/task/mod.rs
+++ b/src/libcore/task/mod.rs
@@ -619,7 +619,7 @@ fn test_spawn_unlinked_unsup_no_fail_down() { // grandchild sends on a port
         let ch = ch.clone();
         do spawn_unlinked {
             // Give middle task a chance to fail-but-not-kill-us.
-            for old_iter::repeat(16) { task::yield(); }
+            for 16.times { task::yield(); }
             ch.send(()); // If killed first, grandparent hangs.
         }
         fail!(); // Shouldn't kill either (grand)parent or (grand)child.
@@ -634,7 +634,7 @@ fn test_spawn_unlinked_unsup_no_fail_up() { // child unlinked fails
 fn test_spawn_unlinked_sup_no_fail_up() { // child unlinked fails
     do spawn_supervised { fail!(); }
     // Give child a chance to fail-but-not-kill-us.
-    for old_iter::repeat(16) { task::yield(); }
+    for 16.times { task::yield(); }
 }
 #[test] #[should_fail] #[ignore(cfg(windows))]
 fn test_spawn_unlinked_sup_fail_down() {
@@ -709,7 +709,7 @@ fn test_spawn_failure_propagate_grandchild() {
             loop { task::yield(); }
         }
     }
-    for old_iter::repeat(16) { task::yield(); }
+    for 16.times { task::yield(); }
     fail!();
 }
 
@@ -721,7 +721,7 @@ fn test_spawn_failure_propagate_secondborn() {
             loop { task::yield(); }
         }
     }
-    for old_iter::repeat(16) { task::yield(); }
+    for 16.times { task::yield(); }
     fail!();
 }
 
@@ -733,7 +733,7 @@ fn test_spawn_failure_propagate_nephew_or_niece() {
             loop { task::yield(); }
         }
     }
-    for old_iter::repeat(16) { task::yield(); }
+    for 16.times { task::yield(); }
     fail!();
 }
 
@@ -745,7 +745,7 @@ fn test_spawn_linked_sup_propagate_sibling() {
             loop { task::yield(); }
         }
     }
-    for old_iter::repeat(16) { task::yield(); }
+    for 16.times { task::yield(); }
     fail!();
 }
 
@@ -904,8 +904,7 @@ fn test_spawn_sched_blocking() {
 
         // Testing that a task in one scheduler can block in foreign code
         // without affecting other schedulers
-        for old_iter::repeat(20u) {
-
+        for 20u.times {
             let (start_po, start_ch) = stream();
             let (fin_po, fin_ch) = stream();
 
@@ -1024,7 +1023,7 @@ fn test_unkillable() {
 
     // We want to do this after failing
     do spawn_unlinked {
-        for old_iter::repeat(10) { yield() }
+        for 10.times { yield() }
         ch.send(());
     }
 
@@ -1059,7 +1058,7 @@ fn test_unkillable_nested() {
 
     // We want to do this after failing
     do spawn_unlinked || {
-        for old_iter::repeat(10) { yield() }
+        for 10.times { yield() }
         ch.send(());
     }