Skip to content

Commit 9db3120

Browse files
author
Felix Raimundo
committed
Add a link to thread::Builder in thread::spawn
1 parent c655348 commit 9db3120

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libstd/thread/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ impl Builder {
389389
/// panics, [`join`] will return an [`Err`] containing the argument given to
390390
/// [`panic`].
391391
///
392+
/// This will create a thread using default parameters of [`Builder`], if you
393+
/// want to specify the stack size or the name of the thread, use this API
394+
/// instead.
395+
///
392396
/// # Panics
393397
///
394398
/// Panics if the OS fails to create a thread; use [`Builder::spawn`]
@@ -454,6 +458,7 @@ impl Builder {
454458
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err
455459
/// [`panic`]: ../../std/macro.panic.html
456460
/// [`Builder::spawn`]: ../../std/thread/struct.Builder.html#method.spawn
461+
/// [`Builder`]: ../../std/thread/struct.Builder.html
457462
#[stable(feature = "rust1", since = "1.0.0")]
458463
pub fn spawn<F, T>(f: F) -> JoinHandle<T> where
459464
F: FnOnce() -> T, F: Send + 'static, T: Send + 'static

0 commit comments

Comments
 (0)