Crates.io | futures_future |
lib.rs | futures_future |
version | 0.1.1 |
source | src |
created_at | 2018-09-11 12:29:02.86037 |
updated_at | 2018-09-28 12:07:46.195329 |
description | The Rust crate that converts the old style futures crate `futures::Future` into the new nightly async/await style `std::future::Future` so you can easily try out the new syntax. |
homepage | https://github.com/tinco/futures_future |
repository | https://github.com/tinco/futures_future |
max_upload_size | |
id | 84101 |
size | 3,682 |
This requires some kind of task system, which I can't figure out. It might sporadically work, but not consistently because there's no implementation for waking up tasks.
The Rust crate that converts the old style futures crate futures::Future
into the new
nightly async/await style std::future::Future
so you can easily try out the new
syntax.
#![feature(async_await)]
#![feature(futures_api)]
#![feature(await_macro)]
use futures::*;
use futures::sync::oneshot;
use futures_future::*;
pub async fn and_its_done() {
let (signal_setup_done, mut setup_done) = oneshot::channel::<bool>();
let _ = signal_setup_done.send(true);
let f = futures_future(&mut setup_done);
await!(f);
}