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

doc: Clarify requirements of AsyncFd #3635

Merged
merged 2 commits into from Mar 22, 2021

Conversation

dzfranklin
Copy link
Contributor

Clarifies that users of AsyncFd must set the fd to nonblocking and should only poll readiness after failing to read/write.

Motivation

As a newcomer, I misunderstood what I needed to do elsewhere in my code to properly use an AsyncFd.

Solution

Add to docs. Alice Ryhl helped me debug my code. Some of the wording paraphrases her explanation to me.

Clarifies that users of AsyncFd must set the fd to nonblocking and
should only poll readiness after failing to read/write.

I made both these mistakes, and Alice Ryhl helped me debug my code. Some
of the wording paraphrases her explanation to me.
tokio/src/io/async_fd.rs Outdated Show resolved Hide resolved
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-io Module: tokio/io T-docs Topic: documentation labels Mar 22, 2021
Co-authored-by: Alice Ryhl <alice@ryhl.io>
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

Thanks!

@Darksonn Darksonn merged commit 10abc45 into tokio-rs:master Mar 22, 2021
@Darksonn Darksonn mentioned this pull request Apr 12, 2021
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 T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants