-
Notifications
You must be signed in to change notification settings - Fork 739
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
Mio-st changes #901
Comments
Thanks for listing these out. It might be easiest to have a dedicated issue per proposal for discussion and tackle it a couple at a time.
I'm OK renaming it, but generally idiomatic rust tries to avoid "stuttering". So, if
That seems odd to me as it would require I believe that for event in &events { } |
This would create a forwards compat hazard. Adding variants is a breaking change. I think the desired goal of preventing empty |
I've opened #905 to discuss the renaming of
This is not a change I feel strongly about, but I did it to reduce the API surface. In mio-st |
There is the unstable |
With #986 most things are done, so closing. |
Carl (@carllerche) asked me to help maintain mio after I forked mio to change it to be single threaded. In that fork I made some changes, of which the following (might) make sense for mio. Everything below is my opinion, feel free to disagree and discuss!
Token
intoEventedId
, Token is too generic, EventedId is a bitmore specific.
Ready
intoReady
andInterests
.Interests
is used inregistering (
Evented
) and can only be readable and/or writable, but never beempty.
Ready
is only used as output inEvent
and can also be error or hup.Ready
toevent
module, as now it's really only a part ofEvent
.Interests
in thepoll
module, as it's input to poll.(re)register.PollOpt
into an enum, disallowing empty poll options, also movedit to the
poll
module.Events
to useArrayVec
, dropping the need for an allocation andfor the user to determine the capacity of events.
Events
andevent::Iter
, now&mut Events
implementsIterator
.Evented
handles don't have to be deregistered, for example.unix::EventedIo
public.ConnectedUdpSocket
, same asUdpSocket
but then withsend
insteadof
send_to
methods. Also droppedsend_to
and friends fromUdpSocket
.Allows for less misuse of the API.
INTERESTS: Interests (Ready)
constants to all types that implementEvented
, allows people to easily use the interests that make the most sense,e.g. readable & writable for
TcpStream
.Low priority
Poll
toPoller
,poller.poll
looks slightly better to me.PollOpt
toPollOption
, it's a long name already.pipe
.SocketAddr
, rather then&SocketAddr
asSocketAddr
is copy anyway.Maybe out of scope
Poller
(Poll
), droppingRegistration
and
SetReadiness
.Overview
The module layout in mio_st looks like this:
P.S. if discussions around 1 change becomes to long it might be best to create a seperate issue and make this more of a meta issue.
The text was updated successfully, but these errors were encountered: