Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

gpui: Remove `ExitProcess` shutdown workaround (#61219)

John Tur7eb8af27a6f1
diff --git a/Cargo.lock b/Cargo.lock
index fde8ae565b8..d50177c148a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1559,9 +1559,9 @@ dependencies = [
[[package]]
name = "aws-lc-rs"
-version = "1.16.3"
+version = "1.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ec6fb3fe69024a75fa7e1bfb48aa6cf59706a101658ea01bfd33b2b248a038f"
+checksum = "4342d8937fc7e5dd9b1c60292261c0670c882a2cd1719cfc11b1af41731e32ad"
dependencies = [
"aws-lc-sys",
"untrusted 0.7.1",
@@ -1570,14 +1570,15 @@ dependencies = [
[[package]]
name = "aws-lc-sys"
-version = "0.40.0"
+version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f50037ee5e1e41e7b8f9d161680a725bd1626cb6f8c7e901f91f942850852fe7"
+checksum = "6d9ceb1da931507a12f4fccea479dccd00da1943e1b4ae72d8e502d707361444"
dependencies = [
"cc",
"cmake",
"dunce",
"fs_extra",
+ "pkg-config",
]
[[package]]
diff --git a/crates/gpui_windows/src/platform.rs b/crates/gpui_windows/src/platform.rs
index b3ad4962004..f8939e9e4c3 100644
--- a/crates/gpui_windows/src/platform.rs
+++ b/crates/gpui_windows/src/platform.rs
@@ -423,17 +423,6 @@ impl Platform for WindowsPlatform {
self.inner
.with_callback(|callbacks| &callbacks.quit, |callback| callback());
-
- // Bypass the CRT exit logic, which runs atexit handlers before calling ExitProcess.
- // aws-lc registers an atexit handler that intentionally acquires a lock without releasing it.
- // aws-lc also has thread_local objects which acquire this lock in their destructor.
- // Destructors for thread_locals run under the loader lock, so there is a race condition
- // where, if a thread exits after atexit handlers have run, the TLS destructors will block
- // indefinitely on this lock while holding the loader lock. Since ExitProcess also requires
- // the loader lock, process teardown will deadlock.
- unsafe {
- windows::Win32::System::Threading::ExitProcess(0);
- }
}
fn quit(&self) {