rust/library/std/src/sync
bors 15fc228d0d Auto merge of #97791 - m-ou-se:const-locks, r=m-ou-se
Make {Mutex, Condvar, RwLock}::new() const.

This makes it possible to have `static M: Mutex<_> = Mutex::new(..);` 🎉

Our implementations [on Linux](https://github.com/rust-lang/rust/pull/95035), [on Windows](https://github.com/rust-lang/rust/pull/77380), and various BSDs and some tier 3 platforms have already been using a non-allocating const-constructible implementation. As of https://github.com/rust-lang/rust/pull/97647, the remaining platforms (most notably macOS) now have a const-constructible implementation as well. This means we can finally make these functions publicly const.

Tracking issue: https://github.com/rust-lang/rust/issues/93740
2022-06-19 08:20:36 +00:00
..
barrier std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
condvar Remove condvar::two_mutexes test. 2022-05-05 21:47:13 +02:00
lazy_lock Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
mpsc use 128 cache align for m1 mac 2022-06-01 12:07:30 +08:00
mutex Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
once Stabilize poison API of Once, rename poisoned() 2021-02-04 15:20:14 +01:00
once_lock Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
rwlock Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
barrier.rs Rollup merge of #87440 - twetzel59:fix-barrier-no-op, r=yaahc 2021-10-21 14:11:02 +09:00
condvar.rs Make {Mutex, Condvar, RwLock}::new() const. 2022-06-06 13:55:43 +02:00
lazy_lock.rs Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
mod.rs Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
mutex.rs Auto merge of #97791 - m-ou-se:const-locks, r=m-ou-se 2022-06-19 08:20:36 +00:00
once.rs Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
once_lock.rs Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
poison.rs Auto merge of #97791 - m-ou-se:const-locks, r=m-ou-se 2022-06-19 08:20:36 +00:00
rwlock.rs Auto merge of #97791 - m-ou-se:const-locks, r=m-ou-se 2022-06-19 08:20:36 +00:00