From 9db31206f597444258a46220f39fde13a76453e2 Mon Sep 17 00:00:00 2001 From: Felix Raimundo Date: Tue, 9 May 2017 13:27:22 +0200 Subject: [PATCH] Add a link to `thread::Builder` in `thread::spawn` --- src/libstd/thread/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index c1e894510b9..19adf3e3c3f 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -389,6 +389,10 @@ pub fn spawn(self, f: F) -> io::Result> where /// panics, [`join`] will return an [`Err`] containing the argument given to /// [`panic`]. /// +/// This will create a thread using default parameters of [`Builder`], if you +/// want to specify the stack size or the name of the thread, use this API +/// instead. +/// /// # Panics /// /// Panics if the OS fails to create a thread; use [`Builder::spawn`] @@ -454,6 +458,7 @@ pub fn spawn(self, f: F) -> io::Result> where /// [`Err`]: ../../std/result/enum.Result.html#variant.Err /// [`panic`]: ../../std/macro.panic.html /// [`Builder::spawn`]: ../../std/thread/struct.Builder.html#method.spawn +/// [`Builder`]: ../../std/thread/struct.Builder.html #[stable(feature = "rust1", since = "1.0.0")] pub fn spawn(f: F) -> JoinHandle where F: FnOnce() -> T, F: Send + 'static, T: Send + 'static -- 2.44.0