From 0d6e46944bfffaaa2e5c1a58c7056ec435287d43 Mon Sep 17 00:00:00 2001 From: Jeb Rosen Date: Sat, 7 Sep 2019 12:31:04 -0700 Subject: [PATCH] Use tokio's current_thread runtime for async_test to increase performance. --- core/lib/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/src/lib.rs b/core/lib/src/lib.rs index f8b78b90..c3cf12ad 100644 --- a/core/lib/src/lib.rs +++ b/core/lib/src/lib.rs @@ -153,5 +153,5 @@ pub fn custom(config: config::Config) -> Rocket { /// WARNING: This is unstable! Do not use this method outside of Rocket! #[doc(hidden)] pub fn async_test(fut: impl std::future::Future + Send) -> R { - tokio::runtime::Runtime::new().expect("create tokio runtime").block_on(fut) + tokio::runtime::current_thread::Runtime::new().expect("create tokio runtime").block_on(fut) }