about summary refs log tree commit diff
path: root/src/libstd/rt/util.rs
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-03-19 18:38:16 -0400
committerManish Goregaokar <manishsmail@gmail.com>2015-03-20 05:36:07 +0530
commit71321ff33fa3fe71cc1df541b3d0547b4e208923 (patch)
treefd701f6e9e786cffe42a7a84bbb949b2e60697fd /src/libstd/rt/util.rs
parent7cbc42849f7586d3c567d7ac8f202839f9b968e8 (diff)
downloadrust-71321ff33fa3fe71cc1df541b3d0547b4e208923.tar.gz
rust-71321ff33fa3fe71cc1df541b3d0547b4e208923.zip
Remove rt::default_sched_threads and RUST_THREADS.
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]

Conflicts:
	src/libtest/lib.rs
Diffstat (limited to 'src/libstd/rt/util.rs')
-rw-r--r--src/libstd/rt/util.rs23
1 files changed, 0 insertions, 23 deletions
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,