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

Added a big-picture explanation for thread::park() & co. #33665

Merged

Conversation

golddranks
Copy link
Contributor

As I said in https://www.reddit.com/r/rust/comments/4ihvv1/hey_rust_programmers_got_a_question_ask_here/d372s4i, the current explanation of the park() and unpark() is a bit unclear. It says that they're used for blocking, but then it goes on explaining the semantics in detail, leaving the bigger picture a bit unclear.

I added a short high-level explanation that explains how the functions are used. I also exposed the full paths (thread::park() and thread::Thread::unpark()), because unpark(), being a method, is not directly visible at the module level.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (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.

@golddranks
Copy link
Contributor Author

This is a documentation change so
r? @steveklabnik

@rust-highfive rust-highfive assigned steveklabnik and unassigned aturon May 16, 2016
@aturon
Copy link
Member

aturon commented May 17, 2016

Looks good to me!

@bors: r+

@bors
Copy link
Collaborator

bors commented May 17, 2016

📌 Commit 20b9129 has been approved by aturon

bors added a commit that referenced this pull request May 17, 2016
…tion, r=aturon

Added a big-picture explanation for thread::park() & co.

As I said in https://www.reddit.com/r/rust/comments/4ihvv1/hey_rust_programmers_got_a_question_ask_here/d372s4i, the current explanation of the `park()` and `unpark()` is a bit unclear. It says that they're used for blocking, but then it goes on explaining the semantics in detail, leaving the bigger picture a bit unclear.

I added a short high-level explanation that explains how the functions are used. I also exposed the full paths (`thread::park()` and `thread::Thread::unpark()`), because `unpark()`, being a method, is not directly visible at the module level.
@bors
Copy link
Collaborator

bors commented May 17, 2016

⌛ Testing commit 20b9129 with merge 0667ae9...

@bors bors merged commit 20b9129 into rust-lang:master May 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants