mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
runtime: rename current_thread -> basic_scheduler (#1769)
It no longer supports executing !Send futures. The use case for It is wanting a “light” runtime. There will be “local” task execution using a different strategy coming later. This patch also renames `thread_pool` -> `threaded_scheduler`, but only in public APIs for now.
This commit is contained in:
@@ -27,7 +27,7 @@ pub mod task;
|
||||
pub fn block_on<F: std::future::Future>(future: F) -> F::Output {
|
||||
use tokio::runtime;
|
||||
|
||||
let mut rt = runtime::Builder::new().current_thread().build().unwrap();
|
||||
let mut rt = runtime::Builder::new().basic_scheduler().build().unwrap();
|
||||
|
||||
rt.block_on(future)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user