Clarify that RUST_MIN_STACK is internally cached
For larger applications it's important that users set `RUST_MIN_STACK` at the start of their program because `min_stack` caches the value. Not doing so can lead to their `env::set_var` call surprisingly not having any effect.
This commit is contained in:
parent
7ac4b82ddd
commit
54567efda7
1 changed files with 2 additions and 1 deletions
|
@ -131,7 +131,8 @@
|
||||||
//!
|
//!
|
||||||
//! * Build the thread with [`Builder`] and pass the desired stack size to [`Builder::stack_size`].
|
//! * Build the thread with [`Builder`] and pass the desired stack size to [`Builder::stack_size`].
|
||||||
//! * Set the `RUST_MIN_STACK` environment variable to an integer representing the desired stack
|
//! * Set the `RUST_MIN_STACK` environment variable to an integer representing the desired stack
|
||||||
//! size (in bytes). Note that setting [`Builder::stack_size`] will override this.
|
//! size (in bytes). Note that setting [`Builder::stack_size`] will override this. Also, note
|
||||||
|
//! that `RUST_MIN_STACK` is cached internally so should be set before any threads are started.
|
||||||
//!
|
//!
|
||||||
//! Note that the stack size of the main thread is *not* determined by Rust.
|
//! Note that the stack size of the main thread is *not* determined by Rust.
|
||||||
//!
|
//!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue