summaryrefslogtreecommitdiffstats
path: root/tokio/tests/rt_common.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 /tokio/tests/rt_common.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 'tokio/tests/rt_common.rs')
-rw-r--r--tokio/tests/rt_common.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/tokio/tests/rt_common.rs b/tokio/tests/rt_common.rs
index 1273593f..a4091616 100644
--- a/tokio/tests/rt_common.rs
+++ b/tokio/tests/rt_common.rs
@@ -6,12 +6,11 @@
macro_rules! rt_test {
($($t:tt)*) => {
- mod basic_scheduler {
+ mod current_thread_scheduler {
$($t)*
fn rt() -> Arc<Runtime> {
- tokio::runtime::Builder::new()
- .basic_scheduler()
+ tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.unwrap()
@@ -23,9 +22,8 @@ macro_rules! rt_test {
$($t)*
fn rt() -> Arc<Runtime> {
- tokio::runtime::Builder::new()
- .threaded_scheduler()
- .core_threads(4)
+ tokio::runtime::Builder::new_multi_thread()
+ .worker_threads(4)
.enable_all()
.build()
.unwrap()
@@ -37,9 +35,8 @@ macro_rules! rt_test {
$($t)*
fn rt() -> Arc<Runtime> {
- tokio::runtime::Builder::new()
- .threaded_scheduler()
- .core_threads(1)
+ tokio::runtime::Builder::new_multi_thread()
+ .worker_threads(1)
.enable_all()
.build()
.unwrap()