From 54daf496e2e957a9f69aa88bf6c42520a2dbfa02 Mon Sep 17 00:00:00 2001 From: joboet Date: Mon, 25 Apr 2022 15:19:50 +0200 Subject: std: directly use pthread in UNIX parker implementation Mutex and Condvar are being replaced by more efficient implementations, which need thread parking themselves (see #93740). Therefore use the pthread synchronization primitives directly. Also, avoid allocating because the Parker struct is being placed in an Arc anyways. --- library/std/src/sys/unix/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'library/std/src/sys/unix/mod.rs') diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs index aedeb02e656..8e909aab7f0 100644 --- a/library/std/src/sys/unix/mod.rs +++ b/library/std/src/sys/unix/mod.rs @@ -39,6 +39,7 @@ pub mod stdio; pub mod thread; pub mod thread_local_dtor; pub mod thread_local_key; +pub mod thread_parker; pub mod time; #[cfg(target_os = "espidf")] -- cgit 1.4.1-3-g733a5