diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-06-23 18:22:57 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-06-24 17:07:03 -0700 |
| commit | e65d0cbabebc73f2c9733a7ed158576c9702e71e (patch) | |
| tree | 717d289c5fda8bc54c7d5fb340a94949a6432ac2 /src/libstd/rt/mod.rs | |
| parent | d071f51cdc7c3492ae2bc4180ffbf13bcdb31439 (diff) | |
| download | rust-e65d0cbabebc73f2c9733a7ed158576c9702e71e.tar.gz rust-e65d0cbabebc73f2c9733a7ed158576c9702e71e.zip | |
extra: Make test runner compatible with newsched
Diffstat (limited to 'src/libstd/rt/mod.rs')
| -rw-r--r-- | src/libstd/rt/mod.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 8713cf05a47..bbf1cf0d9b7 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -63,11 +63,9 @@ Several modules in `core` are clients of `rt`: use cell::Cell; use clone::Clone; use container::Container; -use from_str::FromStr; use iter::Times; use iterator::IteratorUtil; -use option::{Some, None}; -use os; +use option::Some; use ptr::RawPtr; use rt::sched::{Scheduler, Coroutine, Shutdown}; use rt::sleeper_list::SleeperList; @@ -223,10 +221,7 @@ pub fn run(main: ~fn()) -> int { static DEFAULT_ERROR_CODE: int = 101; - let nthreads = match os::getenv("RUST_THREADS") { - Some(nstr) => FromStr::from_str(nstr).get(), - None => util::num_cpus() - }; + let nthreads = util::default_sched_threads(); // The shared list of sleeping schedulers. Schedulers wake each other // occassionally to do new work. |
