diff options
| author | bors <bors@rust-lang.org> | 2013-11-24 21:32:13 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-24 21:32:13 -0800 |
| commit | 2cc1e16ac0ee1fe5ea07125215e2ee1d39e63c12 (patch) | |
| tree | 456081dd6cdf57c5e1b7cc14e509e89d8a184fea /src/test | |
| parent | ca3274336e9d61b29f6862b4706a2a105a208f0a (diff) | |
| parent | acca9e3834842ee8d8104abe9b8b9bb88861793c (diff) | |
| download | rust-2cc1e16ac0ee1fe5ea07125215e2ee1d39e63c12.tar.gz rust-2cc1e16ac0ee1fe5ea07125215e2ee1d39e63c12.zip | |
auto merge of #10603 : alexcrichton/rust/no-linked-failure, r=brson
The reasons for doing this are: * The model on which linked failure is based is inherently complex * The implementation is also very complex, and there are few remaining who fully understand the implementation * There are existing race conditions in the core context switching function of the scheduler, and possibly others. * It's unclear whether this model of linked failure maps well to a 1:1 threading model Linked failure is often a desired aspect of tasks, but we would like to take a much more conservative approach in re-implementing linked failure if at all. Closes #8674 Closes #8318 Closes #8863
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/bench/shootout-k-nucleotide-pipes.rs | 4 | ||||
| -rw-r--r-- | src/test/bench/task-perf-jargon-metal-smoke.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/task-perf-linked-failure.rs | 3 | ||||
| -rw-r--r-- | src/test/run-fail/fail-task-name-none.rs | 7 | ||||
| -rw-r--r-- | src/test/run-fail/fail-task-name-owned.rs | 9 | ||||
| -rw-r--r-- | src/test/run-fail/fail-task-name-send-str.rs | 5 | ||||
| -rw-r--r-- | src/test/run-fail/fail-task-name-static.rs | 4 | ||||
| -rw-r--r-- | src/test/run-fail/task-spawn-barefn.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/unwind-box.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/unwind-resource.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/unwind-resource2.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/unwind-unique.rs | 2 |
12 files changed, 25 insertions, 19 deletions
diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs index 5cc8e161f5f..7becdee43a4 100644 --- a/src/test/bench/shootout-k-nucleotide-pipes.rs +++ b/src/test/bench/shootout-k-nucleotide-pipes.rs @@ -179,9 +179,9 @@ fn main() { let (from_parent, to_child) = comm::stream(); - do task::spawn_with(from_parent) |from_parent| { + do spawn { make_sequence_processor(sz, &from_parent, &to_parent_); - }; + } to_child }.collect::<~[Chan<~[u8]>]>(); diff --git a/src/test/bench/task-perf-jargon-metal-smoke.rs b/src/test/bench/task-perf-jargon-metal-smoke.rs index 0827f7d3447..889885c3388 100644 --- a/src/test/bench/task-perf-jargon-metal-smoke.rs +++ b/src/test/bench/task-perf-jargon-metal-smoke.rs @@ -28,7 +28,7 @@ fn child_generation(gens_left: uint, c: comm::Chan<()>) { // With this code, only as many generations are alive at a time as tasks // alive at a time, let c = Cell::new(c); - do task::spawn_supervised { + do spawn { let c = c.take(); if gens_left & 1 == 1 { task::deschedule(); // shake things up a bit diff --git a/src/test/bench/task-perf-linked-failure.rs b/src/test/bench/task-perf-linked-failure.rs index 73ecd33bc7c..eb0e64268f3 100644 --- a/src/test/bench/task-perf-linked-failure.rs +++ b/src/test/bench/task-perf-linked-failure.rs @@ -1,4 +1,5 @@ // xfail-pretty +// xfail-test linked failure // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at @@ -35,8 +36,6 @@ fn grandchild_group(num_tasks: uint) { for _ in range(0, num_tasks) { let ch = ch.clone(); let mut t = task::task(); - t.linked(); - t.unwatched(); do t.spawn { // linked ch.send(()); let (p, _c) = stream::<()>(); diff --git a/src/test/run-fail/fail-task-name-none.rs b/src/test/run-fail/fail-task-name-none.rs index 542ccfb0aea..9d58c182008 100644 --- a/src/test/run-fail/fail-task-name-none.rs +++ b/src/test/run-fail/fail-task-name-none.rs @@ -10,8 +10,11 @@ // error-pattern:task '<unnamed>' failed at 'test' +use std::task; + fn main() { - do spawn { + do task::try { fail!("test"); - } + 1 + }.unwrap() } diff --git a/src/test/run-fail/fail-task-name-owned.rs b/src/test/run-fail/fail-task-name-owned.rs index ff3596df142..9e87b59db64 100644 --- a/src/test/run-fail/fail-task-name-owned.rs +++ b/src/test/run-fail/fail-task-name-owned.rs @@ -10,10 +10,13 @@ // error-pattern:task 'owned name' failed at 'test' +use std::task; + fn main() { - let mut t = ::std::task::task(); + let mut t = task::task(); t.name(~"owned name"); - do t.spawn { + do t.try { fail!("test"); - } + 1 + }.unwrap() } diff --git a/src/test/run-fail/fail-task-name-send-str.rs b/src/test/run-fail/fail-task-name-send-str.rs index 96fe82fa5ca..0e3ef39cd1d 100644 --- a/src/test/run-fail/fail-task-name-send-str.rs +++ b/src/test/run-fail/fail-task-name-send-str.rs @@ -13,7 +13,8 @@ fn main() { let mut t = ::std::task::task(); t.name("send name".to_send_str()); - do t.spawn { + do t.try { fail!("test"); - } + 3 + }.unwrap() } diff --git a/src/test/run-fail/fail-task-name-static.rs b/src/test/run-fail/fail-task-name-static.rs index a20dbe42c6d..4fd19fb2a6f 100644 --- a/src/test/run-fail/fail-task-name-static.rs +++ b/src/test/run-fail/fail-task-name-static.rs @@ -13,7 +13,7 @@ fn main() { let mut t = ::std::task::task(); t.name("static name"); - do t.spawn { + do t.try { fail!("test"); - } + }.unwrap() } diff --git a/src/test/run-fail/task-spawn-barefn.rs b/src/test/run-fail/task-spawn-barefn.rs index 75b50c4f6ed..ae189889967 100644 --- a/src/test/run-fail/task-spawn-barefn.rs +++ b/src/test/run-fail/task-spawn-barefn.rs @@ -15,7 +15,7 @@ use std::task; fn main() { // the purpose of this test is to make sure that task::spawn() // works when provided with a bare function: - task::spawn(startfn); + task::try(startfn).unwrap(); } fn startfn() { diff --git a/src/test/run-pass/unwind-box.rs b/src/test/run-pass/unwind-box.rs index 24e898a90bb..2b3e44a6529 100644 --- a/src/test/run-pass/unwind-box.rs +++ b/src/test/run-pass/unwind-box.rs @@ -18,5 +18,5 @@ fn f() { } pub fn main() { - task::spawn_unlinked(f); + task::spawn(f); } diff --git a/src/test/run-pass/unwind-resource.rs b/src/test/run-pass/unwind-resource.rs index c5276b727a9..e2460ba6b04 100644 --- a/src/test/run-pass/unwind-resource.rs +++ b/src/test/run-pass/unwind-resource.rs @@ -42,7 +42,7 @@ fn f(c: SharedChan<bool>) { pub fn main() { let (p, c) = stream(); let c = SharedChan::new(c); - task::spawn_unlinked(|| f(c.clone()) ); + task::spawn(|| f(c.clone()) ); error!("hiiiiiiiii"); assert!(p.recv()); } diff --git a/src/test/run-pass/unwind-resource2.rs b/src/test/run-pass/unwind-resource2.rs index ab5ae3aca86..38e5a122a12 100644 --- a/src/test/run-pass/unwind-resource2.rs +++ b/src/test/run-pass/unwind-resource2.rs @@ -35,5 +35,5 @@ fn f() { } pub fn main() { - task::spawn_unlinked(f); + task::spawn(f); } diff --git a/src/test/run-pass/unwind-unique.rs b/src/test/run-pass/unwind-unique.rs index 0038392115b..e2e64d72575 100644 --- a/src/test/run-pass/unwind-unique.rs +++ b/src/test/run-pass/unwind-unique.rs @@ -18,5 +18,5 @@ fn f() { } pub fn main() { - task::spawn_unlinked(f); + task::spawn(f); } |
