rust/library/std/src/sync/mpmc
joboet 5a856b82f3
std: allow after-main use of synchronization primitives
By creating an unnamed thread handle when the actual one has already been destroyed, synchronization primitives using thread parking can be used even outside the Rust runtime.

This also fixes an inefficiency in the queue-based `RwLock`: if `thread::current` was not initialized yet, it will create a new handle on every parking attempt without initializing `thread::current`. The private `current_or_unnamed` function introduced here fixes this.
2024-11-18 17:55:36 +01:00
..
array.rs std: allow after-main use of synchronization primitives 2024-11-18 17:55:36 +01:00
context.rs std: allow after-main use of synchronization primitives 2024-11-18 17:55:36 +01:00
counter.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
error.rs Add multi-producer, multi-consumer channel (mpmc) 2024-09-30 20:43:51 +03:00
list.rs std: allow after-main use of synchronization primitives 2024-11-18 17:55:36 +01:00
mod.rs split up the first paragraph of doc comments for better summaries 2024-11-10 13:22:58 -06:00
select.rs initial port of crossbeam-channel 2022-11-09 23:18:06 -05:00
tests.rs Add multi-producer, multi-consumer channel (mpmc) 2024-09-30 20:43:51 +03:00
utils.rs support for mips32r6 as a target_arch value 2023-07-18 18:58:18 +08:00
waker.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
zero.rs std: allow after-main use of synchronization primitives 2024-11-18 17:55:36 +01:00