From 588a189fa9f84886222580b787c35e6dfe19f736 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Sun, 10 Nov 2024 10:10:43 +0100 Subject: [PATCH] Rename method --- crates/editor/src/editor_tests.rs | 2 ++ crates/gpui/src/app.rs | 2 +- crates/gpui/src/executor.rs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs index 7137d08c71..9e51091ab6 100644 --- a/crates/editor/src/editor_tests.rs +++ b/crates/editor/src/editor_tests.rs @@ -7320,6 +7320,8 @@ async fn test_lsp_shutdown(cx: &mut gpui::TestAppContext) { cx, ) .await; + + drop(cx); } #[gpui::test] diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index 82fa13b96e..9c732ea9e9 100644 --- a/crates/gpui/src/app.rs +++ b/crates/gpui/src/app.rs @@ -369,7 +369,7 @@ impl AppContext { let futures = futures::future::join_all(futures); if background_executor - .block_with_timeout_background_and_foreground(SHUTDOWN_TIMEOUT, futures) + .block_to_shutdown(SHUTDOWN_TIMEOUT, futures) .is_err() { log::error!("timed out waiting on app_will_quit"); diff --git a/crates/gpui/src/executor.rs b/crates/gpui/src/executor.rs index 4500bd9f0e..8167144cfa 100644 --- a/crates/gpui/src/executor.rs +++ b/crates/gpui/src/executor.rs @@ -301,7 +301,7 @@ impl BackgroundExecutor { /// Block the current thread until the given future resolves /// or `duration` has elapsed. - pub fn block_with_timeout_background_and_foreground( + pub fn block_to_shutdown( &self, duration: Duration, future: impl Future,