diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-20 05:36:15 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-20 12:43:15 +0530 |
| commit | 6107e4c0b88d9e22482ed88c52b98c2ec2034bb1 (patch) | |
| tree | 4a63350e8437a7fb81d9351e29289214908c0b82 /src/libstd | |
| parent | 0711006694a2e7e79f7fc819b3b04af016a8bf93 (diff) | |
| parent | 71321ff33fa3fe71cc1df541b3d0547b4e208923 (diff) | |
| download | rust-6107e4c0b88d9e22482ed88c52b98c2ec2034bb1.tar.gz rust-6107e4c0b88d9e22482ed88c52b98c2ec2034bb1.zip | |
Rollup merge of #23534 - steveklabnik:remove_sched_threads, r=alexcrichton
As @alexcrichton says, this was really a libgreen thing, and isn't relevant now. As this removes a technically-public function, this is a [breaking-change]
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/rt/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/util.rs | 23 |
2 files changed, 1 insertions, 24 deletions
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 90cc189b9a0..5e8abfd0a3f 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -30,7 +30,7 @@ use thunk::Thunk; use usize; // Reexport some of our utilities which are expected by other crates. -pub use self::util::{default_sched_threads, min_stack, running_on_valgrind}; +pub use self::util::{min_stack, running_on_valgrind}; pub use self::unwind::{begin_unwind, begin_unwind_fmt}; // Reexport some functionality from liballoc. diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs index e72fd7b3320..f1c43a07e6e 100644 --- a/src/libstd/rt/util.rs +++ b/src/libstd/rt/util.rs @@ -58,29 +58,6 @@ pub fn min_stack() -> uint { return amt; } -/// Get's the number of scheduler threads requested by the environment -/// either `RUST_THREADS` or `num_cpus`. -#[allow(deprecated)] -pub fn default_sched_threads() -> uint { - use os; - match env::var("RUST_THREADS") { - Ok(nstr) => { - let opt_n: Option<uint> = nstr.parse().ok(); - match opt_n { - Some(n) if n > 0 => n, - _ => panic!("`RUST_THREADS` is `{}`, should be a positive integer", nstr) - } - } - Err(..) => { - if limit_thread_creation_due_to_osx_and_valgrind() { - 1 - } else { - os::num_cpus() - } - } - } -} - // Indicates whether we should perform expensive sanity checks, including rtassert! // // FIXME: Once the runtime matures remove the `true` below to turn off rtassert, |
