File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ pub use self::local::{LocalKey, LocalKeyState};
235
235
pub struct Builder {
236
236
// A name for the thread-to-be, for identification in panic messages
237
237
name : Option < String > ,
238
- // The size of the stack for the spawned thread
238
+ // The size of the stack for the spawned thread in bytes
239
239
stack_size : Option < usize > ,
240
240
}
241
241
@@ -289,14 +289,17 @@ impl Builder {
289
289
self
290
290
}
291
291
292
- /// Sets the size of the stack for the new thread.
292
+ /// Sets the size of the stack (in bytes) for the new thread.
293
+ ///
294
+ /// The actual stack size may be greater than this value if
295
+ /// the platform specifies minimal stack size.
293
296
///
294
297
/// # Examples
295
298
///
296
299
/// ```
297
300
/// use std::thread;
298
301
///
299
- /// let builder = thread::Builder::new().stack_size(10 );
302
+ /// let builder = thread::Builder::new().stack_size(32 * 1024 );
300
303
/// ```
301
304
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
302
305
pub fn stack_size ( mut self , size : usize ) -> Builder {
You can’t perform that action at this time.
0 commit comments