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 /benches/sync_semaphore.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 'benches/sync_semaphore.rs')
-rw-r--r-- | benches/sync_semaphore.rs | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/benches/sync_semaphore.rs b/benches/sync_semaphore.rs index 32d4aa2b..19a1dd33 100644 --- a/benches/sync_semaphore.rs +++ b/benches/sync_semaphore.rs @@ -3,9 +3,8 @@ use std::sync::Arc; use tokio::{sync::Semaphore, task}; fn uncontended(b: &mut Bencher) { - let rt = tokio::runtime::Builder::new() - .core_threads(6) - .threaded_scheduler() + let rt = tokio::runtime::Builder::new_multi_thread() + .worker_threads(6) .build() .unwrap(); @@ -27,9 +26,8 @@ async fn task(s: Arc<Semaphore>) { } fn uncontended_concurrent_multi(b: &mut Bencher) { - let rt = tokio::runtime::Builder::new() - .core_threads(6) - .threaded_scheduler() + let rt = tokio::runtime::Builder::new_multi_thread() + .worker_threads(6) .build() .unwrap(); @@ -51,8 +49,8 @@ fn uncontended_concurrent_multi(b: &mut Bencher) { } fn uncontended_concurrent_single(b: &mut Bencher) { - let rt = tokio::runtime::Builder::new() - .basic_scheduler() + let rt = tokio::runtime::Builder::new_multi_thread() + .worker_threads(0) .build() .unwrap(); @@ -73,9 +71,8 @@ fn uncontended_concurrent_single(b: &mut Bencher) { } fn contended_concurrent_multi(b: &mut Bencher) { - let rt = tokio::runtime::Builder::new() - .core_threads(6) - .threaded_scheduler() + let rt = tokio::runtime::Builder::new_multi_thread() + .worker_threads(6) .build() .unwrap(); @@ -97,8 +94,7 @@ fn contended_concurrent_multi(b: &mut Bencher) { } fn contended_concurrent_single(b: &mut Bencher) { - let rt = tokio::runtime::Builder::new() - .basic_scheduler() + let rt = tokio::runtime::Builder::new_current_thread() .build() .unwrap(); |