Expand description
The runtime of compio.
let ans = compio_runtime::Runtime::new().unwrap().block_on(async {
println!("Hello world!");
42
});
assert_eq!(ans, 42);Modules§
Structs§
- Attach a handle to the driver of current thread.
- The async runtime of compio. It is a thread local runtime, and cannot be sent to other threads.
- Builder for
Runtime. - A spawned task.
Functions§
- Spawns a new asynchronous task, returning a
Taskfor it. - Spawns a blocking task in a new thread, and wait for it.
- Submit an operation to the current runtime, and return a future for it.
- Submit an operation to the current runtime, and return a future for it with flags.
Type Aliases§
- Type alias for
Task<Result<T, Box<dyn Any + Send>>>, which resolves to anErrwhen the spawned future panicked.