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

Migrate to std::future #142

Closed
3 tasks
bstrie opened this issue Jul 18, 2019 · 7 comments
Closed
3 tasks

Migrate to std::future #142

bstrie opened this issue Jul 18, 2019 · 7 comments
Assignees
Labels
dependencies v1.0 Issues which need to be handled for a v1.0 release

Comments

@bstrie
Copy link
Contributor

bstrie commented Jul 18, 2019

This module recently stabilized and is intended to be the long-term replacement for the futures crate. Pieces are being stabilized one at a time, so this will be an ongoing process. The most important piece to migrate is the first piece stabilized, std::future::Future, although as I run across our uses of the futures crate I will note them down here for eventual migration.

  • futures::Future
  • futures::future::Either
  • futures::future::{err, ok, result}
@bstrie bstrie changed the title Migrate to std Migrate to std::future Jul 18, 2019
@bstrie bstrie self-assigned this Jul 18, 2019
@bstrie
Copy link
Contributor Author

bstrie commented Jul 19, 2019

After exploring this a bit I think we'll want to wait a while longer until std::future percolates up through the rest of the async ecosystem, in order to avoid having to spend a lot of effort on compatibility shims that will eventually need to be torn out anyway. Let's reevaluate this in a month.

@bstrie
Copy link
Contributor Author

bstrie commented Jul 30, 2019

Update: tokio, hyper, and hyper-tls all now feature support for std::future on their master branches. Will still want to wait for each of those to have their next official release, but this is an encouraging sign wrt timeframe.

@bstrie
Copy link
Contributor Author

bstrie commented Sep 9, 2019

Update: tokio and hyper now both have alpha releases with full async/await support, although they both still likely have some breaking changes in the pipe so we shouldn't consider using these yet:

https://tokio.rs/blog/2019-08-alphas/

https://seanmonstar.com/post/187493499882/hyper-alpha-supports-asyncawait

Finding a web framework that supports the new versions of each will be the exciting bit, see also #146.

@bstrie
Copy link
Contributor Author

bstrie commented Dec 6, 2019

Update: hyper's next stable release looks imminent, likely this week. Once that's out, then we can expect a stable release of tokio-tungstenite, which itself would allow a stable release of warp. Once those three libraries have released, we'll then be able to begin porting to std::future::Future (and once that's finished we can then upgrade to async/await, possibly in a separate PR).

@gakonst
Copy link
Member

gakonst commented Dec 18, 2019

Update: hyper 0.13.1 is out, and it's had tokio-0.2 support since 0.13. We're now waiting for tokio-tungstenite which has the corresponding PR almost ready for merge: https://github.com/snapview/tokio-tungstenite/pull/68/files

@bstrie
Copy link
Contributor Author

bstrie commented Dec 18, 2019

It occurred to me that we'll probably want to also wait for redis's async/await PR to land, which, according to the maintainers, should proceed during the holidays: redis-rs/redis-rs#232

@gakonst
Copy link
Member

gakonst commented Jan 20, 2020

Fixed in #585

@gakonst gakonst added the v1.0 Issues which need to be handled for a v1.0 release label Jan 20, 2020
@gakonst gakonst self-assigned this Jan 20, 2020
@gakonst gakonst added this to Waiting Review / Response in Towards a v1.0 Jan 20, 2020
@gakonst gakonst closed this as completed Jan 29, 2020
Towards a v1.0 automation moved this from Waiting Review / Response to Done Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies v1.0 Issues which need to be handled for a v1.0 release
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants