Open jgallagher opened 4 years ago
The removal of Registration
and SetReadiness
looks like a much more painful change.
I'm unlikely to do this myself; but if you - or anyone else - would like to contribute a PR then I'd absolutely be open to merging and publishing.
@jgallagher let me know if you need help with this. I don't use this crate but would like to see winit to be upgraded to mio 0.7...
@kaimast I'm not currently working on this. I'm not exactly sure what to do given the discussion on tokio-rs/mio#1289. For my crate I might be able to use the suggestion there and drop mio-extras
altogether (and embed the timeouts into my polling loop), although I'd rather not do that. But given the restriction of a single Waker
per Poll
, I don't know how you'd implement mio-extra
's timers which have no such restriction.
You're right. I don't think this is feasible without extensively changing mio-extra's API. Might be easier to just remove winit's dependency on mio-extra at this point.
I'm basically not expecting to do anything much with mio-extras
myself and haven't yet looked at your code, but:
if you want to submit a pull request, to get your code into this project, I expect I'd be likely to accept it
or if you prefer to publish mio-misc
as an independent project, I'd gladly accept a pull request that directed people towards it
yeah, 0.7 definitely lowered mio qualilty. I'm trying to move to 0.7 but gave up due to lack of timers as well. Looked quickly @ what it would take to pull this crate up to 0.7 but yeah, MIO architecture changed drastically on 0.7 and not for the better.
mio-extras
and mio-misc
don't quite have feature parity.
see comment here - https://github.com/onurzdg/mio-misc/issues/8#issue-1021654328
I've been looking through the crates that are still using Mio v0.6, which by the way is no longer supported, and found this crate/issue. I realise that we've made a number of breaking changes in Mio v0.7 to make the API smaller and that meant that Mio-extras doesn't work with Mio v0.7/v0.8.
The unfortunate truth is that Mio isn't really the right abstraction for a timer or channel implementation. Mio (now) focusses on I/O, dropping everything unrelated to that. Depending on the use case you're already looking pretty similar to a complete (Future
s) runtime.
As more concrete solution to move forward:
timerfd(2)
and kqueue has it's own timer support, but neither can beat an in user space implementation when it comes to performance.More concrete recommendations I can't give without know more of the usage, but I'm always willing to help, just have to ask (ping me on GitHub or Mio's Discord channel).
yeah, 0.7 definitely lowered mio qualilty. I'm trying to move to 0.7 but gave up due to lack of timers as well. Looked quickly @ what it would take to pull this crate up to 0.7 but yeah, MIO architecture changed drastically on 0.7 and not for the better.
@przygienda can you elaborate on this?
While I'd be happy to merge pull requests here that made life easier for folk, I'd also be more than happy to see crates move on to recent versions of mio and drop their mio-extras dependency altogether.
To that end I'd suggest that a good line of attack would be to work through https://crates.io/crates/mio-extras/reverse_dependencies, and figure out what is stopping those crates from getting current.
Currently the newest mio version is 0.8
Hi! I was taking a stab at upgrading a crate of mine that uses mio 0.6 and mio-extras 2.0 to mio 0.7, which made significant API changes (cf blog post linked to by the mio CHANGELOG). An immediate change is that
Evented
has been replaced bySource
; I haven't looked too deeply at whether the other changes impact mio-extras more severely.I realize this crate is in maintenance mode and this may be beyond the scope of what you were hoping to do. Any interest in pursuing this? Or would you be open to a PR moving to mio 0.7? I assume that would require a major version bump on mio-extras to 3.0.