Skip to content

Commit 69d4e31

Browse files
committed
std::rt: Don't overcommit rt test threads. rust-lang#7772
Uses more fds than are available by default on OS X.
1 parent 93c270c commit 69d4e31

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/libstd/rt/test.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ pub fn run_in_mt_newsched_task(f: ~fn()) {
7272
let nthreads = match os::getenv("RUST_TEST_THREADS") {
7373
Some(nstr) => FromStr::from_str(nstr).get(),
7474
None => {
75-
// Using more threads than cores in test code
76-
// to force the OS to preempt them frequently.
77-
// Assuming that this help stress test concurrent types.
78-
util::num_cpus() * 2
75+
util::num_cpus()
7976
}
8077
};
8178

0 commit comments

Comments
 (0)