-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
AsyncFdReadyGuard should provide a method to access the inner field of AsyncFd #3068
Comments
AsyncFdReadyGuard
should provide a method to access the inner field of AsyncFd
Hmm. The |
Indeed. We discussed in the original PR the possibility of later defining a |
the |
Currently
In the future, we can add an |
Taking mutable reference makes TimerFd unusable with tokio::io::unix::AsyncFd (recently introduced in tokio 0.4). See tokio-rs/tokio#3068 (comment) All std types based on file descriptors, like File and TcpStream, actually take non-mutable references in their read/write methods as well.
@Darksonn Is there any release plan about |
See #3208. |
Fixed by #3304. |
Is your feature request related to a problem? Please describe.
Consider implementing
AsyncRead
for a type that wraps another type which implementsstd::io::Read
andAsRawFd
:Describe the solution you'd like
AsyncFdReadyGuard
should provide access toinner
field of itsasync_fd
field. for example:Describe alternatives you've considered
Aa an alternative,
AsyncFd
should implementAsyncRead
andAsyncWrite
like unexportedPollEvented
type.Additional context
PollEvented
is not exported in v0.3.x, andAsyncFd
was added to provide somewhat similar functionalities (based on changes inmio 0.7.x
), however, it lacks some useful implementations.The text was updated successfully, but these errors were encountered: