about summary refs log tree commit diff
path: root/library/std/src/sync/mpmc/context.rs
AgeCommit message (Collapse)AuthorLines
2025-04-27use generic Atomic type where possibleChristopher Durham-3/+3
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-4/+9
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-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.
2022-11-12avoid calling `thread::current` in channel destructorIbraheem Ahmed-4/+5
2022-11-09tidyIbraheem Ahmed-1/+0
2022-11-09remove extra spinning from `mpsc` parkerIbraheem Ahmed-15/+0
2022-11-09initial port of crossbeam-channelIbraheem Ahmed-0/+170