rt, chore: rename internal scheduler types (#4945)

For historical reasons, the current-thread runtime's scheduler was named
BasicScheduler and the multi-thread runtime's scheduler were named
ThreadPool. This patch renames the schedulers to mirror the runtime
names to increase consistency. This patch also moves the scheduler
implementations into a new `runtime::scheduler` module.
This commit is contained in:
Carl Lerche
2022-08-26 09:47:19 -07:00
committed by GitHub
parent 218f2629ff
commit a3411a412c
25 changed files with 125 additions and 120 deletions
+3 -3
View File
@@ -77,7 +77,7 @@ async fn block_in_block() {
#[tokio::test(flavor = "current_thread")]
#[should_panic]
async fn no_block_in_basic_scheduler() {
async fn no_block_in_current_thread_scheduler() {
task::block_in_place(|| {});
}
@@ -91,7 +91,7 @@ fn yes_block_in_threaded_block_on() {
#[test]
#[should_panic]
fn no_block_in_basic_block_on() {
fn no_block_in_current_thread_block_on() {
let rt = runtime::Builder::new_current_thread().build().unwrap();
rt.block_on(async {
task::block_in_place(|| {});
@@ -99,7 +99,7 @@ fn no_block_in_basic_block_on() {
}
#[test]
fn can_enter_basic_rt_from_within_block_in_place() {
fn can_enter_current_thread_rt_from_within_block_in_place() {
let outer = tokio::runtime::Runtime::new().unwrap();
outer.block_on(async {