Uh oh!
There was an error while loading. Please reload this page.
Conversation
rust-highfive
commented
Apr 25, 2017
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
alexcrichton
commented
Apr 26, 2017
steveklabnik
left a comment
There was a problem hiding this comment.
Thanks for this! Some changes and a question.
| #[derive(Clone)] | ||
| #[stable(feature = "rust1", since = "1.0.0")] | ||
| /// A handle to a thread. | ||
| /// A handle to a thread, its just an abstract reference and as such |
There was a problem hiding this comment.
"just" is a poor word for docs; this becomes better just dropping it.
Also, this summary is quite long; I think keeping the initial summary is fine, and putting this after:
/// A handle to a thread.
///
/// It is an abstract...
| /// A handle to a thread. | ||
| /// A handle to a thread, its just an abstract reference and as such | ||
| /// it can be used to identify a thread (by name, for example). In most | ||
| /// usage cases, this struct is not used directly. |
There was a problem hiding this comment.
I am not totally sure what you mean by "used directly" here, could you maybe elaborate a bit on what you're thinking?
There was a problem hiding this comment.
Well if you print debug most of the examples, those are JoinHandle's really, the threads are inside but you aren't really manipulating Thread structs
| /// # Examples | ||
| /// | ||
| /// ``` | ||
| /// use std::thread; |
There was a problem hiding this comment.
this isn't because of you, but while you're here.... this should be
use std::thread::{self, Builder};
| /// println!("thread name: {}", thread.name().unwrap()); | ||
| /// for i in 0..5 { | ||
| /// let thread_name = format!("thread_{}", i); | ||
| /// thread::Builder::new() |
There was a problem hiding this comment.
... and then this should be Builder::new()
| /// let thread_name = format!("thread_{}", i); | ||
| /// thread::Builder::new() | ||
| /// .name(thread_name) // Now you can identify which thread panicked | ||
| /// // thanks to the handle's name |
There was a problem hiding this comment.
are these lines wrapped to 80 cols? they look a bit short to me, but that could be wrong!
ghost
commented
Apr 26, 2017
Ok it is ready :) |
steveklabnik
commented
May 3, 2017
@bors: r+ rollup thank you! |
bors
commented
May 3, 2017
📌 Commit cf52121 has been approved by |
bors
commented
May 3, 2017
⌛ Testing commit cf52121 with merge 5320ff0... |
bors
commented
May 3, 2017
💔 Test failed - status-travis |
alexcrichton
commented
May 3, 2017
@bors: retry
|
ghost
commented
May 3, 2017
I was wondering why the powerpc build was taking so long |
Rewrote the thread struct docs rust-lang#29378
#29378