summaryrefslogtreecommitdiffstats
path: root/benches/spawn.rs
diff options
context:
space:
mode:
authorLucio Franco <luciofranco14@gmail.com>2020-10-12 13:44:54 -0400
committerGitHub <noreply@github.com>2020-10-12 13:44:54 -0400
commit8880222036f37c6204c8466f25e828447f16dacb (patch)
treefd623afc20f73bbce65746a3d1b1b2731ecf30a5 /benches/spawn.rs
parent0893841f31542b2b04c5050a8a4a3c45cf867e55 (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/spawn.rs')
-rw-r--r--benches/spawn.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/benches/spawn.rs b/benches/spawn.rs
index f76daf3f..72a40357 100644
--- a/benches/spawn.rs
+++ b/benches/spawn.rs
@@ -10,8 +10,7 @@ async fn work() -> usize {
}
fn basic_scheduler_local_spawn(bench: &mut Bencher) {
- let runtime = tokio::runtime::Builder::new()
- .basic_scheduler()
+ let runtime = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap();
runtime.block_on(async {
@@ -23,8 +22,7 @@ fn basic_scheduler_local_spawn(bench: &mut Bencher) {
}
fn threaded_scheduler_local_spawn(bench: &mut Bencher) {
- let runtime = tokio::runtime::Builder::new()
- .threaded_scheduler()
+ let runtime = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap();
runtime.block_on(async {
@@ -36,8 +34,7 @@ fn threaded_scheduler_local_spawn(bench: &mut Bencher) {
}
fn basic_scheduler_remote_spawn(bench: &mut Bencher) {
- let runtime = tokio::runtime::Builder::new()
- .basic_scheduler()
+ let runtime = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap();
@@ -48,10 +45,7 @@ fn basic_scheduler_remote_spawn(bench: &mut Bencher) {
}
fn threaded_scheduler_remote_spawn(bench: &mut Bencher) {
- let runtime = tokio::runtime::Builder::new()
- .threaded_scheduler()
- .build()
- .unwrap();
+ let runtime = tokio::runtime::Builder::new_multi_thread().build().unwrap();
bench.iter(|| {
let h = runtime.spawn(work());