]> git.lizzy.rs Git - rust.git/commitdiff
Add stack size doc to `thread::spawn`.
authorFelix Raimundo <felix.raimundo@tweag.io>
Sun, 7 May 2017 16:42:36 +0000 (18:42 +0200)
committerFelix Raimundo <felix.raimundo@tweag.io>
Sun, 7 May 2017 17:31:17 +0000 (19:31 +0200)
Part of #29378

src/libstd/thread/mod.rs

index 4cbcfdbc2d7f677d5c44f232d508c41f6965de5a..2f7a17af779896ccc5e8d3bfd2d925a2e24ec532 100644 (file)
@@ -244,6 +244,11 @@ impl Builder {
     /// Generates the base configuration for spawning a thread, from which
     /// configuration methods can be chained.
     ///
+    /// If the [`stack_size`][stack_size] field is not specified, the stack size
+    /// will be the `RUST_MIN_STACK` environment variable, if it is
+    /// not specified either, a sensible default size will be set (2MB as
+    /// of the writting of this doc).
+    ///
     /// # Examples
     ///
     /// ```
@@ -259,6 +264,8 @@ impl Builder {
     ///
     /// handler.join().unwrap();
     /// ```
+    ///
+    /// [stack_size]: ../../std/thread/struct.Builder.html#method.stack_size
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn new() -> Builder {
         Builder {