-
Notifications
You must be signed in to change notification settings - Fork 341
Expose IoHandle or some way to register mio Evented #60
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
Comments
IMHO this would indeed be very useful to have as public API for being able to write other crates that integrate with the With mio being the de-facto standard for an abstraction over However I remember there being talks about doing an API-breaking release soon, and it's not at 1.0 yet either so exposing mio types in the public API would potentially block an 1.0 release of async-std. |
Hm, yeah. I wonder if it could be hidden behind a feature, marked unstable,
so to speak. That might be a bit much
…On Sat, 17 Aug 2019, 08:01 Sebastian Dröge, ***@***.***> wrote:
IMHO this would indeed be very useful to have as public API for being able
to write other crates that integrate with the async-std reactor/executor
without having to reinvent all that again (plus spawning their own threads
for it).
With mio being the de-facto standard for an abstraction over epoll and
friends, it would also seem like the ideal choice for that.
However I remember there being talks about doing an API-breaking release
soon, and it's not at 1.0 yet either so exposing mio types in the public
API would potentially block an 1.0 release of async-std.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#60?email_source=notifications&email_token=AABGBC44MTJR2DFSRJZ7S6LQE6O4JA5CNFSM4IMNKY62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QFCMQ#issuecomment-522211634>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABGBC6ADYRR6CFDUWZNNXTQE6O4JANCNFSM4IMNKY6Q>
.
|
I believe that might be a valid way forward for the time being until mio or an alternative is 1.0-stable. |
I would suggest creating rolling your own We're hesitant about exposing mio's interface mainly because we might replace it with a different library in the not-too-distant future. |
Yeah, that's what I wanted to avoid, because it's a lot of boilerplate and
not easy to get right and also kinda feels like defeating the point to have
N completely different drivers for each thing that plugs in. Not in scope
at the moment, that's okay
…On Sun, 18 Aug 2019, 16:00 Stjepan Glavina, ***@***.***> wrote:
I would suggest creating rolling your own mio::Poll instance and maybe
driving it in a separate thread rather than attempting to hook into
async-std.
We're hesitant about exposing mio's interface mainly because we might
replace it with a different library in the not-too-distant future.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#60?email_source=notifications&email_token=AABGBC6JABPYRE6UB7YVBATQFFPXXA5CNFSM4IMNKY62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4RBYQI#issuecomment-522329153>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABGBC5KPHVDE5YDKXGNLSLQFFPXXANCNFSM4IMNKY6Q>
.
|
Full agree with @stjepang here. Wanted to add that I'm also sympathetic to having the ability to hook into |
I'd say the main benefit is that it reduces the amount of boilerplate and code duplication considerably, and thus the maintenance burden on other crates. But of course it increases it here by having some more API surface to care about. For the time being, would you accept a PR that adds something behind some kind of unstable feature flag here as long as it's not very intrusive? |
This is not something that's a priority in the short/medium term. Spawning a separate event event loop seems like a reasonable intermediate solution. Going to go ahead and close this to remove it from our active backlog, but this is definitely something we may want to revisit in the future! |
How about label this issue as |
We don't have such a label yet, and out of experience it's not usually something that gets looked at. This is bound to keep coming up though, so I think we'll be fine. Marked it as "api design" for now, as that feels the closest reason why we couldn't move forward with this (: |
Replace vec-arena with slab
Currently this is hidden as an implementation detail of the network driver. Exposing would make it possible to hook up arbitrary Evented e.g. for other kernel event sources.
Perhaps this doesn't belong in async-std... in that case, maybe it could be extracted to another crate?
The text was updated successfully, but these errors were encountered: