-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Lio3 #142
Lio3 #142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I added some minor comments inline.
Thanks!
src/reactor/poll_evented.rs
Outdated
@@ -17,6 +17,12 @@ use tokio_io::{AsyncRead, AsyncWrite}; | |||
|
|||
use reactor::{Handle, Direction}; | |||
|
|||
struct PollEventedInner { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been meaning to make this change.
Would you mind renaming this struct to Registration
and updating the PollEvented
field name to registration
as well?
@@ -292,6 +298,11 @@ impl<E> PollEvented<E> { | |||
&mut self.io | |||
} | |||
|
|||
/// Consumes the `PollEvented` and returns the underlying I/O object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think naming this into_inner
would be more idiomatic.
FreeBSD uses a separate kqueue filter type for lio_listio. This change adds support for that filter type. Full functionality will be provided by the mio-aio and tokio-file crates.
Consumes a PollEvented and returns its inner io object. Useful for io types that have exclusive ownership of a resource.
Rebased. |
Allow tokio to work with
lio_listio
.See also tokio-rs/tokio-core#302