]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/task/mod.rs
Merge remote-tracking branch 'brson/io'
[rust.git] / src / libcore / task / mod.rs
index d31a511eca8c9dc49a6b9868c1957138cafee480..6cdef0e8ee8668cdca42066a04fbabcc02adb1a2 100644 (file)
@@ -710,7 +710,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 iter::repeat(16) { task::yield(); }
+            for old_iter::repeat(16) { task::yield(); }
             ch.send(()); // If killed first, grandparent hangs.
         }
         fail!(); // Shouldn't kill either (grand)parent or (grand)child.
@@ -725,7 +725,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 iter::repeat(16) { task::yield(); }
+    for old_iter::repeat(16) { task::yield(); }
 }
 #[test] #[should_fail] #[ignore(cfg(windows))]
 fn test_spawn_unlinked_sup_fail_down() {
@@ -806,7 +806,7 @@ fn test_spawn_failure_propagate_grandchild() {
             loop { task::yield(); }
         }
     }
-    for iter::repeat(16) { task::yield(); }
+    for old_iter::repeat(16) { task::yield(); }
     fail!();
 }
 
@@ -818,7 +818,7 @@ fn test_spawn_failure_propagate_secondborn() {
             loop { task::yield(); }
         }
     }
-    for iter::repeat(16) { task::yield(); }
+    for old_iter::repeat(16) { task::yield(); }
     fail!();
 }
 
@@ -830,7 +830,7 @@ fn test_spawn_failure_propagate_nephew_or_niece() {
             loop { task::yield(); }
         }
     }
-    for iter::repeat(16) { task::yield(); }
+    for old_iter::repeat(16) { task::yield(); }
     fail!();
 }
 
@@ -842,7 +842,7 @@ fn test_spawn_linked_sup_propagate_sibling() {
             loop { task::yield(); }
         }
     }
-    for iter::repeat(16) { task::yield(); }
+    for old_iter::repeat(16) { task::yield(); }
     fail!();
 }
 
@@ -994,7 +994,7 @@ fn test_spawn_sched_blocking() {
 
         // Testing that a task in one scheduler can block in foreign code
         // without affecting other schedulers
-        for iter::repeat(20u) {
+        for old_iter::repeat(20u) {
 
             let (start_po, start_ch) = stream();
             let (fin_po, fin_ch) = stream();
@@ -1051,10 +1051,10 @@ fn avoid_copying_the_body(spawnfn: &fn(v: ~fn())) {
     let (p, ch) = stream::<uint>();
 
     let x = ~1;
-    let x_in_parent = ptr::addr_of(&(*x)) as uint;
+    let x_in_parent = ptr::to_unsafe_ptr(&*x) as uint;
 
     do spawnfn || {
-        let x_in_child = ptr::addr_of(&(*x)) as uint;
+        let x_in_child = ptr::to_unsafe_ptr(&*x) as uint;
         ch.send(x_in_child);
     }
 
@@ -1111,7 +1111,7 @@ fn test_unkillable() {
 
     // We want to do this after failing
     do spawn_unlinked {
-        for iter::repeat(10) { yield() }
+        for old_iter::repeat(10) { yield() }
         ch.send(());
     }
 
@@ -1146,7 +1146,7 @@ fn test_unkillable_nested() {
 
     // We want to do this after failing
     do spawn_unlinked || {
-        for iter::repeat(10) { yield() }
+        for old_iter::repeat(10) { yield() }
         ch.send(());
     }