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

Document cancellation safety #3900

Merged
merged 2 commits into from
Jun 29, 2021
Merged

Document cancellation safety #3900

merged 2 commits into from
Jun 29, 2021

Conversation

Darksonn
Copy link
Contributor

This PR documents cancellation safety. It also moves the "Avoid racy if preconditions" section in the select! documentation since otherwise the first code block on the page shows how not to use it, which seems counterintuitive.

@Darksonn Darksonn added T-docs Topic: documentation A-tokio Area: The main tokio crate M-io Module: tokio/io M-net Module: tokio/net M-sync Module: tokio/sync M-macros Module: macros in the main Tokio crate labels Jun 28, 2021
Copy link
Member

@carllerche carllerche left a comment

Choose a reason for hiding this comment

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

Great idea 👍 I had a note on formatting, but the content looks good to me.

tokio/src/io/util/async_read_ext.rs Show resolved Hide resolved
Copy link
Member

@carllerche carllerche left a comment

Choose a reason for hiding this comment

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

Great job 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-io Module: tokio/io M-macros Module: macros in the main Tokio crate M-net Module: tokio/net M-sync Module: tokio/sync T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants