Raise rayon thread pool stack size

This commit is contained in:
David Tolnay 2020-05-15 19:14:10 -07:00
parent e8eab7677a
commit c384d91489
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,6 @@
#![allow(dead_code)]
use rayon::ThreadPoolBuilder;
use std::env;
pub mod eq;
@ -12,3 +13,11 @@ pub fn abort_after() -> usize {
Err(_) => usize::max_value(),
}
}
/// Configure Rayon threadpool.
pub fn rayon_init() {
ThreadPoolBuilder::new()
.stack_size(10 * 1024 * 1024)
.build_global()
.unwrap();
}

View File

@ -85,6 +85,7 @@ fn test_simple_precedence() {
/// Test expressions from rustc, like in `test_round_trip`.
#[test]
fn test_rustc_precedence() {
common::rayon_init();
repo::clone_rust();
let abort_after = common::abort_after();
if abort_after == 0 {

View File

@ -40,6 +40,7 @@ use common::eq::SpanlessEq;
#[test]
fn test_round_trip() {
common::rayon_init();
repo::clone_rust();
let abort_after = common::abort_after();
if abort_after == 0 {