]> git.lizzy.rs Git - rust.git/commitdiff
test: Fix deadlock in task-perf-linked-failure
authorBrian Anderson <banderson@mozilla.com>
Tue, 6 Aug 2013 04:15:02 +0000 (21:15 -0700)
committerBrian Anderson <banderson@mozilla.com>
Wed, 7 Aug 2013 22:40:27 +0000 (15:40 -0700)
src/test/bench/task-perf-linked-failure.rs

index 15808427f4a8b55c08d2c442c48ab8e4acc50cfb..7788005775f7897e20fbede324d5fb0318432326 100644 (file)
@@ -34,7 +34,10 @@ fn grandchild_group(num_tasks: uint) {
 
     for _ in range(0, num_tasks) {
         let ch = ch.clone();
-        do task::spawn { // linked
+        let mut t = task::task();
+        t.linked();
+        t.unwatched();
+        do t.spawn { // linked
             ch.send(());
             let (p, _c) = stream::<()>();
             p.recv(); // block forever