Skip to content

Commit ddb9e50

Browse files
author
Felix Raimundo
committed
Add stack size doc to thread::spawn.
Part of #29378
1 parent ced823e commit ddb9e50

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libstd/thread/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@ impl Builder {
244244
/// Generates the base configuration for spawning a thread, from which
245245
/// configuration methods can be chained.
246246
///
247+
/// If the [`stack_size`][stack_size] field is not specified, the stack size
248+
/// will be the `RUST_MIN_STACK` environment variable, if it is
249+
/// not specified either, a sensible default size will be set (2MB as
250+
/// of the writting of this doc).
251+
///
247252
/// # Examples
248253
///
249254
/// ```
@@ -259,6 +264,8 @@ impl Builder {
259264
///
260265
/// handler.join().unwrap();
261266
/// ```
267+
///
268+
/// [stack_size]: ../../std/thread/struct.Builder.html#method.stack_size
262269
#[stable(feature = "rust1", since = "1.0.0")]
263270
pub fn new() -> Builder {
264271
Builder {

0 commit comments

Comments
 (0)