diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-11-24 17:33:37 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-12-18 23:31:35 -0800 |
| commit | 9b03b72d7fb82f07d35e7dcda02754c6da90ae58 (patch) | |
| tree | d64cf416856d211a50083a62fd26b444859ba5eb /src/libstd/rt/task.rs | |
| parent | c009bfdf94a48434e1f6bf3bfe59cf539f464ee2 (diff) | |
| download | rust-9b03b72d7fb82f07d35e7dcda02754c6da90ae58.tar.gz rust-9b03b72d7fb82f07d35e7dcda02754c6da90ae58.zip | |
Remove rt::bookkeeping
This commit removes the runtime bookkeeping previously used to ensure that all Rust tasks were joined before the runtime was shut down. This functionality will be replaced by an RAII style `Thread` API, that will also offer a detached mode. Since this changes the semantics of shutdown, it is a: [breaking-change]
Diffstat (limited to 'src/libstd/rt/task.rs')
| -rw-r--r-- | src/libstd/rt/task.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index babd111b3c2..98940a2b381 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -29,7 +29,6 @@ use str::SendStr; use thunk::Thunk; use rt; -use rt::bookkeeping; use rt::mutex::NativeMutex; use rt::local::Local; use rt::thread::{mod, Thread}; @@ -132,11 +131,6 @@ impl Task { let stack = stack_size.unwrap_or(rt::min_stack()); - // Note that this increment must happen *before* the spawn in order to - // guarantee that if this task exits it will always end up waiting for - // the spawned task to exit. - let token = bookkeeping::increment(); - // Spawning a new OS thread guarantees that __morestack will never get // triggered, but we must manually set up the actual stack bounds once // this function starts executing. This raises the lower limit by a bit @@ -156,7 +150,6 @@ impl Task { let mut f = Some(f); drop(task.run(|| { f.take().unwrap().invoke(()) }).destroy()); - drop(token); }) } |
