diff options
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(); |