A rust library to complete futures via a remote handle: https://crates.io/crates/future_handles
- Rust 100%
| src | Move sync test utils | |
| .gitignore | Filled in Cargo.toml | |
| Cargo.toml | Change feature from sync to spin | |
| LICENSE | Add LGPL 3.0-only as LICENSE | |
| README.md | Add README.md | |
| rust-toolchain.toml | Switching to nightly | |
Future Handles
A rust library to complete futures via a remote handle.
asyncfn func()-> Option<u32>{let(future,handle)=unsync::create();func_with_callback(||{handle.complete(1);});matchfuture.await{// The callback was invoked and the result set via the handle.
Ok(res)=>Some(res),// The callback was never invoked, but the handle has been dropped.
Err(_)=>None}}