Skip to content

Commit 5722c95

Browse files
committed
std::rt: Correct the numbers of default cores
1 parent 915aaa7 commit 5722c95

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/libstd/rt/mod.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,7 @@ pub fn run(main: ~fn()) -> int {
197197

198198
let nthreads = match os::getenv("RUST_THREADS") {
199199
Some(nstr) => FromStr::from_str(nstr).get(),
200-
None => unsafe {
201-
// Using more threads than cores in test code
202-
// to force the OS to preempt them frequently.
203-
// Assuming that this help stress test concurrent types.
204-
util::num_cpus() * 2
205-
}
200+
None => unsafe { util::num_cpus() }
206201
};
207202

208203
let sleepers = SleeperList::new();

0 commit comments

Comments
 (0)