mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-03 14:04:33 +00:00
Add large_thread
feature
This commit is contained in:
parent
5be316ae33
commit
2d689ee698
6 changed files with 21 additions and 4 deletions
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
||||||
rustup update stable
|
rustup update stable
|
||||||
cargo build --verbose
|
cargo build --verbose
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --verbose
|
run: cargo test --features large_thread --verbose
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
|
|
|
@ -46,6 +46,11 @@ traditional_chinese = [
|
||||||
unicode = ["erg_common/unicode", "erg_parser/unicode", "erg_compiler/unicode"]
|
unicode = ["erg_common/unicode", "erg_parser/unicode", "erg_compiler/unicode"]
|
||||||
pretty = ["erg_common/pretty", "erg_parser/pretty", "erg_compiler/unicode"]
|
pretty = ["erg_common/pretty", "erg_parser/pretty", "erg_compiler/unicode"]
|
||||||
pre-commit = []
|
pre-commit = []
|
||||||
|
large_thread = [
|
||||||
|
"erg_common/large_thread",
|
||||||
|
"erg_parser/large_thread",
|
||||||
|
"erg_compiler/large_thread"
|
||||||
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
erg_common = { version = "0.6.0-beta.2", path = "./compiler/erg_common" }
|
erg_common = { version = "0.6.0-beta.2", path = "./compiler/erg_common" }
|
||||||
|
|
|
@ -17,6 +17,7 @@ simplified_chinese = []
|
||||||
traditional_chinese = []
|
traditional_chinese = []
|
||||||
unicode = []
|
unicode = []
|
||||||
pretty = []
|
pretty = []
|
||||||
|
large_thread = []
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
libc = { version = "0.2", default-features = false }
|
libc = { version = "0.2", default-features = false }
|
||||||
|
|
|
@ -8,7 +8,7 @@ where
|
||||||
F: FnOnce() -> T + Send + 'static,
|
F: FnOnce() -> T + Send + 'static,
|
||||||
T: Send + 'static,
|
T: Send + 'static,
|
||||||
{
|
{
|
||||||
if cfg!(windows) {
|
if cfg!(windows) || cfg!(features = "large_thread") {
|
||||||
const STACK_SIZE: usize = 4 * 1024 * 1024;
|
const STACK_SIZE: usize = 4 * 1024 * 1024;
|
||||||
let child = thread::Builder::new()
|
let child = thread::Builder::new()
|
||||||
.stack_size(STACK_SIZE)
|
.stack_size(STACK_SIZE)
|
||||||
|
|
|
@ -22,8 +22,18 @@ traditional_chinese = [
|
||||||
"erg_common/traditional_chinese",
|
"erg_common/traditional_chinese",
|
||||||
"erg_parser/traditional_chinese",
|
"erg_parser/traditional_chinese",
|
||||||
]
|
]
|
||||||
unicode = ["erg_common/unicode"]
|
unicode = [
|
||||||
pretty = ["erg_common/pretty"]
|
"erg_common/unicode",
|
||||||
|
"erg_parser/unicode",
|
||||||
|
]
|
||||||
|
pretty = [
|
||||||
|
"erg_common/pretty",
|
||||||
|
"erg_parser/pretty"
|
||||||
|
]
|
||||||
|
large_thread = [
|
||||||
|
"erg_common/large_thread",
|
||||||
|
"erg_parser/large_thread",
|
||||||
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
erg_common = { version = "0.6.0-beta.2", path = "../erg_common" }
|
erg_common = { version = "0.6.0-beta.2", path = "../erg_common" }
|
||||||
|
|
|
@ -16,6 +16,7 @@ simplified_chinese = ["erg_common/simplified_chinese"]
|
||||||
traditional_chinese = ["erg_common/traditional_chinese"]
|
traditional_chinese = ["erg_common/traditional_chinese"]
|
||||||
unicode = ["erg_common/unicode"]
|
unicode = ["erg_common/unicode"]
|
||||||
pretty = ["erg_common/pretty"]
|
pretty = ["erg_common/pretty"]
|
||||||
|
large_thread = ["erg_common/large_thread"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
erg_common = { version = "0.6.0-beta.2", path = "../erg_common" }
|
erg_common = { version = "0.6.0-beta.2", path = "../erg_common" }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue