[][src]Module drone_core::future

Asynchronous values.

This module provides the runtime for async/await feature. The runtime relies on the Thread-Local Storage feature of Drone threads and should be initialized with [future::init]. There are two ways to use async/await in Drone applications:

  1. The preferred way is to use libcore-drone crate as a dependency. Place the following to the Cargo.toml:

    core = { package = "libcore-drone", version = "0.11.0" }

    This way you can use native Rust async/await syntax.

  2. Without libcore-drone, attempting to use .await will result in the following errors:

    error[E0433]: failed to resolve: could not find `poll_with_tls_context` in `future`
    error[E0433]: failed to resolve: could not find `from_generator` in `future`

    You can use [future::fallback] module instead. Refer the module documentation for examples.



Fallback syntax for async/await when libcore-drone crate is not available.



Wrap a generator in a future.


Uses the thread-local storage of T for the futures task system.


Polls a future in the current task context.