mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
Current thread runtime (#308)
This patch introduces a version of `Runtime` that runs all components on the current thread. This allows users to spawn futures that do not implement `Send`.
This commit is contained in:
@@ -78,7 +78,7 @@ impl Builder {
|
||||
/// # extern crate tokio;
|
||||
/// # use tokio::runtime::Builder;
|
||||
/// # pub fn main() {
|
||||
/// let runtime = Builder::new().build();
|
||||
/// let runtime = Builder::new().build().unwrap();
|
||||
/// // ... call runtime.run(...)
|
||||
/// # let _ = runtime;
|
||||
/// # }
|
||||
|
||||
Reference in New Issue
Block a user