Skip to content

Support for Tokio 0.3 #41

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

Closed
andrekorol opened this issue Oct 21, 2020 · 4 comments
Closed

Support for Tokio 0.3 #41

andrekorol opened this issue Oct 21, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@andrekorol
Copy link

andrekorol commented Oct 21, 2020

The crate currently depends on Tokyo ^0.2, but maybe it would be beneficial to update to the new version since it's considered a beta before 1.0.

If you try to run a program that uses both the cloud-storage and the tokio 0.3 crates, you get a "thread 'main' panicked at 'not currently running on the Tokio runtime." error.

For now, I can use the tokio-compat-02 crate as a workaround, and it could also be used when updating cloud-storage to use tokio 0.3, while its other dependencies also update themselves to use it.

@ThouCheese
Copy link
Owner

ThouCheese commented Oct 21, 2020

To benefit from Tokio 0.3 I think it would make sense to wait for reqwest to update to 0.3 which in turn is blocked on updating hyper to 0.3. As you can see by the number of mentions in the last issue, the whole Rust internet ecosystem is blocked on hyper updating to 0.3. When reqwest's update lands, cloud-storage will definitely move to Tokio 0.3! (If you see any advantage for cloud-storage to move to 0.3 now then please let me know!)

@andrekorol
Copy link
Author

Oh, now I see the bigger picture of dependencies. Thanks for the clarification! With that in mind, I don't see any advantage of updating cloud-storage before the rest of the ecosystem.

I made it work with tokio 0.3 by using the compatibility crate I mentioned, and when it updates to 0.3, all I'll have to do is remove the use tokio_compat_02::FutureExt; import and the .compat() between the future calls and their awaits.

Thanks for the quick reply, I wish all project maintainers were like that :) lol

@ThouCheese
Copy link
Owner

Reqwest is updated! That means that cloud-storage can now follow suit!

@ThouCheese
Copy link
Owner

We failed to get support for Tokio 0.3 as the PR requests, but since 0.7 has landed with support for Tokio 1.0, I think its time to close the PR nonetheless.

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

No branches or pull requests

2 participants