Crate compio_runtime
source ·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.
- Runtime context guard.
- The async runtime of compio. It is a thread local runtime, and cannot be sent to other threads.
- Builder for
Runtime
. - A spawned task.
- A
Send
wrapper for attachable resource that has not been attached. The resource should be able to send to another thread before attaching.
Traits
- Represents an attachable resource to driver.
Functions
- Spawns a new asynchronous task, returning a
Task
for it.