Crate compio_runtime

source ·
Expand description

The runtime of compio. We don’t expose the runtime struct because there could be only one runtime in each thread.

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

Modules

  • Asynchronous events.
  • Utilities for tracking time.

Structs

  • Attach a handle to the driver of current thread.

Functions

  • Attach a raw file descriptor/handle/socket to the runtime.
  • Start a compio runtime and block on the future till it completes.
  • Spawns a new asynchronous task, returning a Task for it.
  • Submit an operation to the runtime.