Skip to content

Add examples of how to read from a channel with a timeout, refs #13862 #14877

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

Merged
merged 1 commit into from
Jun 16, 2014

Conversation

Seldaek
Copy link
Contributor

@Seldaek Seldaek commented Jun 13, 2014

Finally what I promised to do in #13862 /cc @alexcrichton

@Seldaek Seldaek restored the commdocs branch June 13, 2014 22:50
//! handle the timeout case. This first example will abort the task after
//! 10 seconds no matter what:
//!
//! ```
Copy link
Member

Choose a reason for hiding this comment

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

Could you have a hidden statement which sends a message on tx? Just to make it so this doc example doesn't take 10 seconds to run.

@Seldaek
Copy link
Contributor Author

Seldaek commented Jun 14, 2014

Updated, thanks for the feedback @alexcrichton

@alexcrichton
Copy link
Member

Could you squash these commits together? Otherwise looks good to me!

@Seldaek
Copy link
Contributor Author

Seldaek commented Jun 14, 2014

Squashed!

bors added a commit that referenced this pull request Jun 16, 2014
@bors bors closed this Jun 16, 2014
@bors bors merged commit 5412fda into rust-lang:master Jun 16, 2014
@Seldaek Seldaek deleted the commdocs branch June 16, 2014 21:20
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