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

Add missing urls and examples for Condvar docs #40033

Merged
merged 1 commit into from
Feb 28, 2017

Conversation

GuillaumeGomez
Copy link
Member

#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[stable(feature = "wait_timeout", since = "1.5.0")]
pub struct WaitTimeoutResult(bool);

impl WaitTimeoutResult {
/// Returns whether the wait was known to have timed out.
///
/// # Examples
Copy link
Member

Choose a reason for hiding this comment

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

There's a lot going on in the examples in this pull request, and I understand they probably can't get much smaller, but is it possible you could add a short sentence before each example giving an overview of what's going on?

In this particular example, maybe: "Using a CondVar to notify the main thread when when a child thread has started:"

Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder: is a summary enough or wouldn't it be better to just add more comments?

Copy link
Member

Choose a reason for hiding this comment

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

Up to you, though I don't think it would hurt to have both

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's do both then!

@GuillaumeGomez GuillaumeGomez force-pushed the condvar-docs branch 2 times, most recently from b30735c to b16ce2c Compare February 22, 2017 17:54
@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented Feb 22, 2017

So apparently, the WaitTimeoutResult returned from wait_timeout returns always true on timed_out function if it happens once. Not sure if this is expected or not...

PS: the code sample is here.

@GuillaumeGomez
Copy link
Member Author

cc @frewsxcv

@frewsxcv
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 28, 2017

📌 Commit d3b8f56 has been approved by frewsxcv

eddyb added a commit to eddyb/rust that referenced this pull request Feb 28, 2017
…sxcv

Add missing urls and examples for Condvar docs

r? @frewsxcv
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 28, 2017
…sxcv

Add missing urls and examples for Condvar docs

r? @frewsxcv
bors added a commit that referenced this pull request Feb 28, 2017
Rollup of 9 pull requests

- Successful merges: #39977, #40033, #40047, #40056, #40057, #40122, #40124, #40126, #40131
- Failed merges: #40101
@bors bors merged commit d3b8f56 into rust-lang:master Feb 28, 2017
@GuillaumeGomez GuillaumeGomez deleted the condvar-docs branch February 28, 2017 20:35
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.

3 participants