Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Implrove thread::Builder's doc. #41994

Merged
merged 1 commit into from
May 16, 2017
Merged

Conversation

gamazeps
Copy link
Contributor

Part of #29378 .

  • Explains why we would use the builder instead ofthe free function.
  • Changes the parent-child explanation for a spawned-caller in thread::Builder::spawn
  • Adds a link to io::Result in thread::Builder
  • Corrects the return type doc in thread::Builder::spawn

r? @rust-lang/docs

/// be overriden by the OS.
///
/// If the [`stack_size`] field is not specified, the stack size
/// will be the `RUST_MIN_STACK` environment variable. If it is
Copy link
Member

Choose a reason for hiding this comment

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

Extra whitespace before "If it is".

///
/// If the [`stack_size`] field is not specified, the stack size
/// will be the `RUST_MIN_STACK` environment variable. If it is
/// not specified either, a sensible default will be set (2MB as
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure we should give the default value. Especially if it can change depending the platform/architecture.

@gamazeps gamazeps force-pushed the thread-builder branch 2 times, most recently from e9b04c9 to c8ff6f5 Compare May 14, 2017 18:09
@gamazeps
Copy link
Contributor Author

Done :)

/// [`io::Result`] to the thread handle with the given configuration.
///
/// The [`thread::spawn`] free function uses a `Builder` with default
/// configuration and `unwrap`s its return value.
Copy link
Member

Choose a reason for hiding this comment

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

Missing link to the unwrap method. :p

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done :p

Part of rust-lang#29378 .

- In particular explains *why* we would use the builder instead of
  the free function.
- Changes the parent-child explanation for a spawned-caller.
- Add link to `io::Result` in `thread::Builder`
- Corrects the `thread::Builder::spawn` documentation.
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented May 14, 2017

📌 Commit a51777e has been approved by GuillaumeGomez

@frewsxcv frewsxcv added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label May 14, 2017
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 14, 2017
…eGomez

[Doc] Implrove `thread::Builder`'s doc.

Part of rust-lang#29378 .

- Explains *why* we would use the builder instead ofthe free function.
- Changes the parent-child explanation for a spawned-caller in `thread::Builder::spawn`
- Adds a link to `io::Result` in `thread::Builder`
- Corrects the return type doc in `thread::Builder::spawn`

r? @rust-lang/docs
@carols10cents carols10cents added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 15, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this pull request May 15, 2017
…eGomez

[Doc] Implrove `thread::Builder`'s doc.

Part of rust-lang#29378 .

- Explains *why* we would use the builder instead ofthe free function.
- Changes the parent-child explanation for a spawned-caller in `thread::Builder::spawn`
- Adds a link to `io::Result` in `thread::Builder`
- Corrects the return type doc in `thread::Builder::spawn`

r? @rust-lang/docs
frewsxcv added a commit to frewsxcv/rust that referenced this pull request May 15, 2017
…eGomez

[Doc] Implrove `thread::Builder`'s doc.

Part of rust-lang#29378 .

- Explains *why* we would use the builder instead ofthe free function.
- Changes the parent-child explanation for a spawned-caller in `thread::Builder::spawn`
- Adds a link to `io::Result` in `thread::Builder`
- Corrects the return type doc in `thread::Builder::spawn`

r? @rust-lang/docs
frewsxcv added a commit to frewsxcv/rust that referenced this pull request May 16, 2017
…eGomez

[Doc] Implrove `thread::Builder`'s doc.

Part of rust-lang#29378 .

- Explains *why* we would use the builder instead ofthe free function.
- Changes the parent-child explanation for a spawned-caller in `thread::Builder::spawn`
- Adds a link to `io::Result` in `thread::Builder`
- Corrects the return type doc in `thread::Builder::spawn`

r? @rust-lang/docs
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 16, 2017
…eGomez

[Doc] Implrove `thread::Builder`'s doc.

Part of rust-lang#29378 .

- Explains *why* we would use the builder instead ofthe free function.
- Changes the parent-child explanation for a spawned-caller in `thread::Builder::spawn`
- Adds a link to `io::Result` in `thread::Builder`
- Corrects the return type doc in `thread::Builder::spawn`

r? @rust-lang/docs
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 16, 2017
…eGomez

[Doc] Implrove `thread::Builder`'s doc.

Part of rust-lang#29378 .

- Explains *why* we would use the builder instead ofthe free function.
- Changes the parent-child explanation for a spawned-caller in `thread::Builder::spawn`
- Adds a link to `io::Result` in `thread::Builder`
- Corrects the return type doc in `thread::Builder::spawn`

r? @rust-lang/docs
bors added a commit that referenced this pull request May 16, 2017
Rollup of 8 pull requests

- Successful merges: #41489, #41982, #41994, #41995, #42001, #42005, #42011, #42028
- Failed merges:
@bors bors merged commit a51777e into rust-lang:master May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants