A fast and fair select! implementation for asynchronous programming.
See the [select!] or [inline!] macros for documentation.
Add the following to your Cargo.toml
:
toml
selectme = "0.4.0"
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 }
async fn main() { selectme::select! { _ = dostuffasync() => { println!("dostuffasync() completed first") } _ = moreasyncwork() => { println!("moreasyncwork() completed first") } }; } ```
License: MIT/Apache-2.0