Skip to main content

Crate compio_runtime

Crate compio_runtime 

Source
Expand description

The compio runtime.

let ans = compio_runtime::Runtime::new().unwrap().block_on(async {
    println!("Hello world!");
    42
});
assert_eq!(ans, 42);

Modules§

fd
Utilities for working with file descriptors.
timetime
Utilities for tracking time.

Structs§

Attacher
Attach a handle to the driver of current thread.
BufferPool
A buffer pool.
CancelToken
A token that can be used to cancel multiple operations at once.
Cancelled
An std::error::Error indicating that a future was cancelled.
JoinHandle
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.
RuntimeBuilder
Builder for Runtime.
RuntimeInner
Inner structure of Runtime.
Submit
Returned Future for Runtime::submit.
SubmitMulti
Returned Stream for Runtime::submit_multi.
SubmitMultiManaged
A wrapper around SubmitMulti that iterates the buffers from the results.
WithCancel
A future with a CancelToken attached to it.
WithCancelFailFast
A fail-fast future with a CancelToken attached to it.
WithPersonality
A future with a personality attached to it.

Traits§

ErrorExt
Extension trait for io::Error and results with it.
FutureExt
Extension trait for futures.
ResumeUnwind
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 JoinHandle for 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.