Expand description
The compio runtime.
let ans = compio_runtime::Runtime::new().unwrap().block_on(async {
println!("Hello world!");
42
});
assert_eq!(ans, 42);Modules§
Structs§
- Attacher
- Attach a handle to the driver of current thread.
- Buffer
Pool - A buffer pool.
- Cancel
Token - A token that can be used to cancel multiple operations at once.
- Cancelled
- An
std::error::Errorindicating that a future was cancelled. - Join
Handle - A handle that awaits the result of a task.
- OptWaker
- An optimized waker that avoids unnecessary wake-ups on the same thread.
- Runtime
- The async runtime of compio.
- Runtime
Builder - Builder for
Runtime. - Runtime
Inner - Inner structure of
Runtime. - Submit
- Returned
FutureforRuntime::submit. - Submit
Multi - Returned
StreamforRuntime::submit_multi. - Submit
Multi Managed - A wrapper around
SubmitMultithat iterates the buffers from the results. - With
Cancel - A future with a
CancelTokenattached to it. - With
Cancel Fail Fast - A fail-fast future with a
CancelTokenattached to it. - With
Personality - A future with a personality attached to it.
Traits§
- Error
Ext - Extension trait for
io::Errorand results with it. - Future
Ext - Extension trait for futures.
- Resume
Unwind - Trait to resume unwind from a
JoinError.
Functions§
- register_
files - Register file descriptors for fixed-file operations with the current runtime’s io_uring instance.
- spawn
- Spawns a new asynchronous task, returning a
JoinHandlefor it. - spawn_
blocking - Spawns a blocking task in a new thread, and wait for it.
- submit
- Submit an operation to the current runtime, and return a future for it.
- submit_
multi - Submit a multishot operation to the current runtime, and return a stream for it.
- unregister_
files - Unregister previously registered file descriptors from the current runtime’s io_uring instance.