about summary refs log tree commit diff
path: root/library/std/src/sys/unix/mod.rs
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2022-04-25 15:19:50 +0200
committerjoboet <jonasboettiger@icloud.com>2022-04-25 15:19:50 +0200
commit54daf496e2e957a9f69aa88bf6c42520a2dbfa02 (patch)
tree3ecee0dc5e3b5f0e8c3a93ce4bd6ecb5eaf05a5f /library/std/src/sys/unix/mod.rs
parentb759b2218649016cc40e82bdd6d958e2277ff6d7 (diff)
downloadrust-54daf496e2e957a9f69aa88bf6c42520a2dbfa02.tar.gz
rust-54daf496e2e957a9f69aa88bf6c42520a2dbfa02.zip
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.
Diffstat (limited to 'library/std/src/sys/unix/mod.rs')
-rw-r--r--library/std/src/sys/unix/mod.rs1
1 files changed, 1 insertions, 0 deletions
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")]