Skip to content
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

tokio 1.0 support #289

Closed
incker opened this issue Oct 17, 2020 · 7 comments · Fixed by #301
Closed

tokio 1.0 support #289

incker opened this issue Oct 17, 2020 · 7 comments · Fixed by #301

Comments

@incker
Copy link

incker commented Oct 17, 2020

New version of tokio is released
current version of tokio is 0.2 Cargo.toml

Better upgrade, to avoid downloading two versions of tokio in projects

@diwic
Copy link
Owner

diwic commented Oct 17, 2020

Ok, feel free to submit a PR!

@ids1024
Copy link
Contributor

ids1024 commented Oct 17, 2020

This seem to require a few straightforward changes, but also tokio::io::Registration is no longer publicly exposed. Not sure what to replace the uses of that with (I'd need to look more into exactly how it works).

@diwic
Copy link
Owner

diwic commented Oct 25, 2020

Filed tokio-rs/tokio#3040 upstream, let's see what they say.

@f-koehler
Copy link

f-koehler commented Dec 9, 2020

The issue tokio-rs/tokio#3040 was closed and a comment about using AsyncFd was added (see tokio-rs/tokio#2903). This new type is available in tokio from version v0.3.2 onwards.

@qwandor
Copy link
Contributor

qwandor commented Dec 27, 2020

Has anyone been able to make progress on this? Tokio 1.0 is now out, so it would be great to support that.

@diwic diwic changed the title tokio = "0.3.0" tokio 1.0 support Dec 27, 2020
@diwic
Copy link
Owner

diwic commented Dec 27, 2020

Nothing that I'm aware of. But we should probably target 1.0 rather than 0.3 now, so I changed the title.

@coolreader18
Copy link
Contributor

I'm looking into this now, it's definitely possible to replace watch_reg/Registration::new(mio::EventedFd) with AsyncFd, but waker_reg is a bit more tricky; I'm not very well-versed in how event loops/reactors work, but I think it might be possible to just use the Waker from the Context that we get passed, along with a Arc<Mutex<Waker>> or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants