-
Notifications
You must be signed in to change notification settings - Fork 789
Split Poll into Poll and Register #932
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
Conversation
This also makes `Poll::poll` require `&mut self` since `Poll` is no longer expected to be stored in a `Sync` context. Resolves #757
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.
Mostly looks good to me, added some small comments.
The only thing I don't really like is poll.register().register(...)
in some of the tests. Maybe get_register
or register_ref
would make it better.
@Thomasdezeeuw I agree with you about the tests and
Thoughts? |
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.
The only thing I don't really like is
poll.register().register(...)
I agree that the stuttering feels weird. What if the type Register
were renamed to Registry
? Then it reads as poll.registry().register(..)
...
@seanmonstar @Thomasdezeeuw I don't have a huge opinion re: what |
FWIW, I'm +1 on renaming |
Same here. Even though |
|
LGTM |
This also makes
Poll::poll
require&mut self
sincePoll
is nolonger expected to be stored in a
Sync
context.Resolves #757
This is a very large change and I would not look for perfection, just that nothing in the change is terribly broken. This will be but one of many PRs to transition Mio to 0.7 and I am attempting to make it as incremental as possible.
cc @Thomasdezeeuw @stjepang