compio_runtime/
lib.rs

1//! The runtime of compio.
2//!
3//! ```
4//! let ans = compio_runtime::Runtime::new().unwrap().block_on(async {
5//!     println!("Hello world!");
6//!     42
7//! });
8//! assert_eq!(ans, 42);
9//! ```
10
11#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
12#![warn(missing_docs)]
13
14mod attacher;
15mod runtime;
16
17#[cfg(feature = "event")]
18pub mod event;
19#[cfg(feature = "time")]
20pub mod time;
21
22pub use async_task::Task;
23pub use attacher::*;
24use compio_buf::BufResult;
25pub use runtime::{
26    JoinHandle, Runtime, RuntimeBuilder, spawn, spawn_blocking, submit, submit_with_flags,
27};