Uh oh!
There was an error while loading. Please reload this page.
[DOC] Improve the thread::park and thread::unpark documentation - #41809
Conversation
- Adds an explanantion of what `park` does in the `unpark` documentation. - Adds a link to the module doc.
rust-highfive
commented
May 7, 2017
(rust_highfive has picked a reviewer for you, use r? to override) |
Mark-Simulacrum
commented
May 7, 2017
| /// The semantics of this function are equivalent to `park()` except that the | ||
| /// thread will be blocked for roughly no longer than `ms`. This method | ||
| /// should not be used for precise timing due to anomalies such as | ||
| /// The semantics of this function are equivalent to [`park()`][[park] except |
| /// The semantics of this function are equivalent to `park()` except that the | ||
| /// thread will be blocked for roughly no longer than `dur`. This method | ||
| /// should not be used for precise timing due to anomalies such as | ||
| /// The semantics of this function are equivalent to [`park()`][[park] except |
There was a problem hiding this comment.
So much typos, the shame is strong in me.
There was a problem hiding this comment.
I don't know if you are allowed to use the () here 😄
There was a problem hiding this comment.
It is used elsewhre and I checked that they worked, so I think I am allowed to do that.
I can be removed if you want to though.
There was a problem hiding this comment.
currently, the policy is to remove the () for method/function names in docs (see also #40456), though it's not a huge deal
There was a problem hiding this comment.
It shall be done then :p
There was a problem hiding this comment.
Indeed, missed that one.
There was a problem hiding this comment.
this still needs to be fixed
Part of rust-lang#29378 - Moves the module documentation into `park`. - Add the same example as the one from `unpark` to `park`.
| /// .unwrap(); | ||
| /// | ||
| /// // Let some time pass for the thread to be spawned. | ||
| /// thread::sleep(Duration::from_millis(10)); |
There was a problem hiding this comment.
As per the failures on Travis (scroll near the bottom), you'll need to import Duration into scope here
gamazeps
commented
May 7, 2017
All comments are addressed (sory for the delay I'm following the French election at the same time :p) |
carols10cents
commented
May 8, 2017
Looks like one travis job failed due to network failure on checking out the PR, logged here #40474 (comment) and restarted the travis build. |
steveklabnik
left a comment
There was a problem hiding this comment.
r=me after that link gets fixed
There was a problem hiding this comment.
this still needs to be fixed
| /// .unwrap(); | ||
| /// | ||
| /// // Let some time pass for the thread to be spawned. | ||
| /// thread::sleep(Duration::from_millis(10)); |
[Doc] improve `thread::Thread` and `thread::Builder` documentations Part of #29378 - Adds information about the stack_size when using `Builder`. This might be considered too low level, but I assume that if someone wants to create their own builder instead of using `thread::spawn` they may be interested in that info. - Updates the `thread::Thread` structure doc, mostly by explaining how to get one, the previous example was removed because it was not related to `thread::Thread`, but rather to `thread::Builder::name`. Not much is present there, mostly because this API is not often used (the only method that seems useful is `unpark`, which is documented in #41809).
frewsxcv
commented
May 10, 2017
@bors r=steveklabnik rollup |
bors
commented
May 10, 2017
📌 Commit afe74c3 has been approved by |
[DOC] Improve the thread::park and thread::unpark documentation Part of rust-lang#29378 . Takes care of the documentation for `park`, `park_duration` and also improves the `unpark` example. - `park should` have its module documentation inlined here, and cleaned up. - `park_timeout` could use links to `park`.
gamazeps
commented
May 10, 2017
Link is fixed I think :) |
[DOC] Improve the thread::park and thread::unpark documentation Part of rust-lang#29378 . Takes care of the documentation for `park`, `park_duration` and also improves the `unpark` example. - `park should` have its module documentation inlined here, and cleaned up. - `park_timeout` could use links to `park`.
frewsxcv
commented
May 10, 2017
Yep, looks fixed! Just waiting to be tested and merged by our infrastructure |
[DOC] Improve the thread::park and thread::unpark documentation Part of rust-lang#29378 . Takes care of the documentation for `park`, `park_duration` and also improves the `unpark` example. - `park should` have its module documentation inlined here, and cleaned up. - `park_timeout` could use links to `park`.
Part of #29378 .
Takes care of the documentation for
park,park_durationand also improves theunparkexample.park shouldhave its module documentation inlined here, and cleaned up.park_timeoutcould use links topark.