diff options
author | Lucio Franco <luciofranco14@gmail.com> | 2020-10-12 13:44:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 13:44:54 -0400 |
commit | 8880222036f37c6204c8466f25e828447f16dacb (patch) | |
tree | fd623afc20f73bbce65746a3d1b1b2731ecf30a5 /tokio/tests/rt_threaded.rs | |
parent | 0893841f31542b2b04c5050a8a4a3c45cf867e55 (diff) |
rt: Remove `threaded_scheduler()` and `basic_scheduler()` (#2876)
Co-authored-by: Alice Ryhl <alice@ryhl.io>
Co-authored-by: Carl Lerche <me@carllerche.com>
Diffstat (limited to 'tokio/tests/rt_threaded.rs')
-rw-r--r-- | tokio/tests/rt_threaded.rs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tokio/tests/rt_threaded.rs b/tokio/tests/rt_threaded.rs index 1ac6ed32..90ebf6a6 100644 --- a/tokio/tests/rt_threaded.rs +++ b/tokio/tests/rt_threaded.rs @@ -18,10 +18,9 @@ use std::task::{Context, Poll}; #[test] fn single_thread() { // No panic when starting a runtime w/ a single thread - let _ = runtime::Builder::new() - .threaded_scheduler() + let _ = runtime::Builder::new_multi_thread() .enable_all() - .core_threads(1) + .worker_threads(1) .build(); } @@ -188,8 +187,7 @@ fn drop_threadpool_drops_futures() { let a = num_inc.clone(); let b = num_dec.clone(); - let rt = runtime::Builder::new() - .threaded_scheduler() + let rt = runtime::Builder::new_multi_thread() .enable_all() .on_thread_start(move || { a.fetch_add(1, Relaxed); @@ -228,8 +226,7 @@ fn start_stop_callbacks_called() { let after_inner = after_start.clone(); let before_inner = before_stop.clone(); - let rt = tokio::runtime::Builder::new() - .threaded_scheduler() + let rt = tokio::runtime::Builder::new_multi_thread() .enable_all() .on_thread_start(move || { after_inner.clone().fetch_add(1, Ordering::Relaxed); @@ -329,8 +326,7 @@ fn multi_threadpool() { // channel yields occasionally even if there are values ready to receive. #[test] fn coop_and_block_in_place() { - let rt = tokio::runtime::Builder::new() - .threaded_scheduler() + let rt = tokio::runtime::Builder::new_multi_thread() // Setting max threads to 1 prevents another thread from claiming the // runtime worker yielded as part of `block_in_place` and guarantees the // same thread will reclaim the worker at the end of the @@ -380,8 +376,7 @@ fn coop_and_block_in_place() { // Testing this does not panic #[test] fn max_threads() { - let _rt = tokio::runtime::Builder::new() - .threaded_scheduler() + let _rt = tokio::runtime::Builder::new_multi_thread() .max_threads(1) .build() .unwrap(); |