diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-03-19 18:38:16 -0400 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-20 05:36:07 +0530 |
| commit | 71321ff33fa3fe71cc1df541b3d0547b4e208923 (patch) | |
| tree | fd701f6e9e786cffe42a7a84bbb949b2e60697fd /src/libtest | |
| parent | 7cbc42849f7586d3c567d7ac8f202839f9b968e8 (diff) | |
| download | rust-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/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 9 |
1 files changed, 7 insertions, 2 deletions
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<F>(opts: &TestOpts, Ok(()) } +#[allow(deprecated)] fn get_concurrency() -> uint { - use std::rt; match env::var("RUST_TEST_THREADS") { Ok(s) => { let opt_n: Option<uint> = 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() + } } } } |
