We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93c270c commit 49b72bdCopy full SHA for 49b72bd
src/libstd/rt/test.rs
@@ -64,18 +64,17 @@ pub fn run_in_mt_newsched_task(f: ~fn()) {
64
use os;
65
use from_str::FromStr;
66
use rt::sched::Shutdown;
67
- use rt::util;
68
69
let f_cell = Cell::new(f);
70
71
do run_in_bare_thread {
72
let nthreads = match os::getenv("RUST_TEST_THREADS") {
73
Some(nstr) => FromStr::from_str(nstr).get(),
74
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
+ // A reasonable number of threads for testing
+ // multithreading. NB: It's easy to exhaust OS X's
+ // low maximum fd limit by setting this too high (#7772)
+ 4
79
}
80
};
81
0 commit comments