Remove linked failure from the runtime

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
This commit is contained in:
Alex Crichton
2013-11-21 16:55:40 -08:00
parent 85a1eff3a9
commit acca9e3834
39 changed files with 400 additions and 2528 deletions

View File

@@ -708,10 +708,11 @@ impl Context {
let prog_chan = prog_chan.clone();
let mut task = task::task();
task.unlinked(); // we kill things manually
task.name(format!("worker{}", i));
task.spawn_with(cache.clone(),
|cache| worker(cache, &port, &chan, &prog_chan));
let cache = cache.clone();
do task.spawn {
worker(cache, &port, &chan, &prog_chan);
}
fn worker(cache: RWArc<Cache>,
port: &SharedPort<Work>,