Add a link to thread::Builder in thread::spawn

This commit is contained in:
Felix Raimundo 2017-05-09 13:27:22 +02:00
parent c655348f26
commit 9db31206f5

View File

@ -389,6 +389,10 @@ impl Builder {
/// 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 @@ impl Builder {
/// [`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, T>(f: F) -> JoinHandle<T> where
F: FnOnce() -> T, F: Send + 'static, T: Send + 'static