From 71321ff33fa3fe71cc1df541b3d0547b4e208923 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 19 Mar 2015 18:38:16 -0400 Subject: 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 --- src/libtest/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/libtest') diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index e4ccd49e807..51decbab858 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -44,6 +44,7 @@ #![feature(std_misc)] #![feature(libc)] #![feature(set_stdio)] +#![feature(os)] extern crate getopts; extern crate serialize; @@ -841,8 +842,8 @@ fn run_tests(opts: &TestOpts, Ok(()) } +#[allow(deprecated)] fn get_concurrency() -> uint { - use std::rt; match env::var("RUST_TEST_THREADS") { Ok(s) => { let opt_n: Option = s.parse().ok(); @@ -852,7 +853,11 @@ fn get_concurrency() -> uint { } } Err(..) => { - rt::default_sched_threads() + if std::rt::util::limit_thread_creation_due_to_osx_and_valgrind() { + 1 + } else { + std::os::num_cpus() + } } } } -- cgit 1.4.1-3-g733a5