-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
src/libstd/thread/mod.rs
Outdated
/// 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 |
There was a problem hiding this comment.
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".
src/libstd/thread/mod.rs
Outdated
/// | ||
/// 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 |
There was a problem hiding this comment.
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.
e9b04c9
to
c8ff6f5
Compare
Done :) |
src/libstd/thread/mod.rs
Outdated
/// [`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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Thanks! @bors: r+ rollup |
📌 Commit a51777e has been approved by |
…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
…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
…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
…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
…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
…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
Part of #29378 .
thread::Builder::spawn
io::Result
inthread::Builder
thread::Builder::spawn
r? @rust-lang/docs