-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
meta: update to std::future and release an alpha. #1201
Comments
I'll take some (if not all) examples on me. Feel free to ping me on Gitter, merge request incoming. |
Note: while the tokio-threadpool crate was updated, the tokio crate itself is currently hardcoded to current_thread runtime. We should probably open an issue for that. I tried porting the required modules but couldn't quite figure out what the updated code should look like. |
@archseer good call. |
Is there a reason AsyncRead and AsyncWrite are not just reexported from futures? These are causing incompatibility problems for me. If it's not intentional, I'll send a PR. |
@CryZe so far, that's been intentional. There's been desire to explore alternate method signatures. What compatibility issues are there? With other libraries? |
Thanks! With this I can now almost get things running (still tackling compat stuff). What I did notice though is that tokio-uds pulls in the tokio v0.1 crates because the dependency on it in tokio doesn't specify path ="../tokio-uds" I think: https://github.com/tokio-rs/tokio/blob/master/tokio/Cargo.toml#L87 |
FYI, proxy example at 914038e (rubdos/tokio/proxy-example) works now (with
|
Seems like all other examples depend on some decision like #1225, since some kind of |
Should |
@alex thanks 👍 |
I've implemented a crate using I'm getting this error:
At this point, I know what's causing it, and that there is a workaround available to make |
I think "chat", "udp-codec" and "tinydb" examples can be checked off as well. |
@osa1 thanks, its done! An update, I think we want to get all the examples updated and do a final pass of the crates then we can start publishing alphas! |
You forgot the TCP echo on the examples list :) |
@seanmonstar wrote:
I might be missing something obvious, but it is awkward to use tokio::TcpStream and friends which implements tokio::AsyncRead/Write and reconcile that with much of the Futures API which expects its own AsyncRead/Write. Is there an alternative to TcpStream that implements futures::Async* ? |
I'm working on reimplementing |
@rrichardson you can use this compat layer for now https://github.com/nemo157/futures-tokio-compat/ we are still exploring the API a bit and the one in the futures crate isn't stable either. @agausmann I believe we've been using https://github.com/tokio-rs/async/blob/master/async-util/src/future/poll_fn.rs#L34 but there is also https://docs.rs/futures-preview/0.3.0-alpha.17/futures/future/fn.poll_fn.html |
This PR fixes the print each packet example in tokio. Refs: tokio-rs#1201
This PR fixes the print each packet example in tokio. Refs: tokio-rs#1201
This PR fixes the print each packet example in tokio. Refs: #1201
This was done! 🎉 |
This issue tracks the progress of updating Tokio to use
std::future
.Crates to update
Examples
The examples should be updated to idiomatic async / await syntax.
Additional functionality
Besides requiring crates to have transitioned to
std::future
, some examples are blocked on additional functionality being added.Alpha release
The first alpha release will happen once the examples have been updated.
The text was updated successfully, but these errors were encountered: