Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions library/std/src/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,8 @@ impl Builder {
/// (It is the responsibility of the program to either eventually join threads it
/// creates or detach them; otherwise, a resource leak will result.)
///
/// This call 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.
/// This function creates a thread with the default parameters. To specify the
/// new thread's stack size or the name, use [`Builder::spawn`].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the default parameters" of what? Perhaps something like

Suggested change
/// This function creates a thread with the default parameters. To specify the
/// new thread's stack size or the name, use [`Builder::spawn`].
/// This function creates a thread with the default parameters of [`Builder`]. To specify the
/// new thread's stack size or the name, use [`Builder::spawn`].

(though it doubles the links)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent suggestion. Done!

///
/// As you can see in the signature of `spawn` there are two constraints on
/// both the closure given to `spawn` and its return value, let's explain them:
Expand Down
5 changes: 2 additions & 3 deletions library/std/src/thread/scoped.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,8 @@ impl<'scope, 'env> Scope<'scope, 'env> {
/// end of the scope. In that case, if the spawned thread panics, [`scope`] will
/// panic after all threads are joined.
///
/// This call will create a thread using default parameters of [`Builder`].
/// If you want to specify the stack size or the name of the thread, use
/// [`Builder::spawn_scoped`] instead.
/// This function creates a thread with the default parameters. To specify the
/// new thread's stack size or the name, use [`Builder::spawn_scoped`].
///
/// # Panics
///
Expand Down
Loading