-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Can't install tokio async await ( LocalWaker ) #908
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
Comments
|
Exact so I presume Async Await is dead for the moment ? Do you have a work around ? |
The workaround will be to use an older nightly. We'll need to discuss with |
Using an older nightly breaks other crates. As a work around you can do this: [dependencies]
futures-preview = { version = "0.3.0-alpha.13", features = ["compat"] }
tokio = "*" #![features(async_await, await_macro, futures_api)]
use futures::future::FutureObj;
use futures::prelude::*;
fn main() {
tokio::run(FutureObj::new(Box::new(async move {
println!("running");
tokio::spawn(FutureObj::new(Box::new(async move {
println!("spawned");
Ok(())
})).compat());
Ok(())
})).compat());
} |
Thank you David for the work around. The issue is I can't even build. Do you have a specific .toml according to it ? @taiki-e seems to be the Real MVP here. I hope your PR will be accepted ! Thanks everyone for your help in this issue. |
@victordetarragon If you are returning futures from trait functions you need to wrap them in |
- Rewrite noop_waker with items from the new API and replaces LocalWaker with Waker. - Bump the minimum required version for `tokio-async-await` to 1.34.0-nightly. - `Unpin` was added to std prelude. - Add `cargo check` to .travis.yml Fixes: #908
Pushed out a release w/ the fix. Thanks @taiki-e |
Version
Following this page and from a new cargo init :
https://github.com/tokio-rs/tokio/tree/master/tokio-async-await
testing_tokio v0.1.0 (/root/testing_tokio)
└── tokio v0.1.15
├── tokio-async-await v0.1.5
│ └── tokio-io v0.1.11
├── tokio-codec v0.1.1
│ └── tokio-io v0.1.11 ()
├── tokio-current-thread v0.1.4
│ └── tokio-executor v0.1.6
├── tokio-executor v0.1.6 ()
├── tokio-fs v0.1.5
│ ├── tokio-io v0.1.11 ()
│ └── tokio-threadpool v0.1.11
│ └── tokio-executor v0.1.6 ()
│ └── tokio-io v0.1.11 ()
├── tokio-io v0.1.11 ()
├── tokio-reactor v0.1.8
│ ├── tokio-executor v0.1.6 ()
│ └── tokio-io v0.1.11 ()
├── tokio-sync v0.1.1
├── tokio-tcp v0.1.3
│ ├── tokio-io v0.1.11 ()
│ └── tokio-reactor v0.1.8 ()
├── tokio-threadpool v0.1.11 ()
├── tokio-timer v0.2.10
│ └── tokio-executor v0.1.6 ()
├── tokio-udp v0.1.3
│ ├── tokio-codec v0.1.1 ()
│ ├── tokio-io v0.1.11 ()
│ └── tokio-reactor v0.1.8 ()
└── tokio-uds v0.2.5
├── tokio-codec v0.1.1 ()
├── tokio-io v0.1.11 ()
└── tokio-reactor v0.1.8 ()
Platform
Linux 4.13.0-kali1-amd64 #1 SMP Debian 4.13.10-1kali2 (2017-11-08) x86_64 GNU/Linux
Description
I am simply following the exemple. Nothing more. And I have the following issue during the build :
Compiling tokio-async-await v0.1.5 error[E0432]: unresolved import
std::task::LocalWaker--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-async-await-0.1.5/src/compat/forward.rs:7:17 | 7 | use std::task::{LocalWaker, Poll as StdPoll}; | ^^^^^^^^^^ no
LocalWakerin
taskSeems to be relate with Future issue about LocalWaker ...
Thank you.
The text was updated successfully, but these errors were encountered: