mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2024-11-24 00:10:15 +00:00
Raise rayon thread pool stack size
This commit is contained in:
parent
e8eab7677a
commit
c384d91489
@ -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();
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user