tree: 1c6cc8e7a3ce6c1a8fe78d1d2939744ddfbb9e61 [path history] [tgz]
  1. benches/
  2. examples/
  3. src/
  4. tests/
  5. .cargo-checksum.json
  6. Cargo.lock
  7. Cargo.toml
  8. CHANGELOG.md
  9. LICENSE-APACHE
  10. LICENSE-MIT
  11. OWNERS
  12. README.md
  13. rustfmt.toml
third_party/rust_crates/vendor/async-executor/README.md

async-executor

Build License Cargo Documentation

Async executors.

Examples

use async_executor::Executor;
use futures_lite::future;

// Create a new executor.
let ex = Executor::new();

// Spawn a task.
let task = ex.spawn(async {
    println!("Hello world");
});

// Run the executor until the task completes.
future::block_on(ex.run(task));

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.