selectme

github crates.io docs.rs build status

A fast and fair select! implementation for asynchronous programming.

See the [select!] or [inline!] macros for documentation.

Usage

Add the following to your Cargo.toml:

toml selectme = "0.2.5"

Examples

The following is a simple example showcasing two branches being polled concurrently. For more documentation see [select!].

```rust async fn dostuffasync() { // async work }

async fn moreasyncwork() { // more here }

[tokio::main]

async fn main() { selectme::select! { _ = dostuffasync() => { println!("dostuffasync() completed first") } _ = moreasyncwork() => { println!("moreasyncwork() completed first") } }; } ```

License: MIT/Apache-2.0