about summary refs log tree commit diff
path: root/library/std/src/sync/mpmc/zero.rs
AgeCommit message (Collapse)AuthorLines
2025-04-27use generic Atomic type where possibleChristopher Durham-2/+2
in core/alloc/std only for now, and ignoring test files Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
2024-11-18std: allow after-main use of synchronization primitivesjoboet-2/+4
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-09-25Use `&raw` in the standard libraryJosh Stone-10/+2
Since the stabilization in #127679 has reached stage0, 1.82-beta, we can start using `&raw` freely, and even the soft-deprecated `ptr::addr_of!` and `ptr::addr_of_mut!` can stop allowing the unstable feature. I intentionally did not change any documentation or tests, but the rest of those macro uses are all now using `&raw const` or `&raw mut` in the standard library.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-1/+0
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-14std: Unsafe-wrap std::syncJubilee Young-8/+12
2024-02-24library: use `addr_of!`Pavel Grigorenko-2/+6
2023-01-11rework and document backoff behavior of `sync::mpsc`Ibraheem Ahmed-1/+1
2022-11-09initial port of crossbeam-channelIbraheem Ahmed-0/+318