summary refs log tree commit diff
path: root/library/std/src/sys/sync/once
AgeCommit message (Collapse)AuthorLines
2024-09-17Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut`Chayim Refael Friedman-0/+27
In the implementation of `force_mut`, I chose performance over safety. For `LazyLock` this isn't really a choice; the code has to be unsafe. But for `LazyCell`, we can have a full-safe implementation, but it will be a bit less performant, so I went with the unsafe approach.
2024-07-31std: fix busy-waiting in `Once::wait_force`, add more testsjoboet-4/+8
2024-07-31std: implement the `once_wait` featurejoboet-94/+178
2024-07-29Reformat `use` declarations.Nicholas Nethercote-7/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-17Auto merge of #125942 - timokroeger:windows-once-futex, r=ChrisDentonbors-0/+1
Windows: Use futex implementation for `Once` Keep the queue implementation for win7. Inspired by PR #121956 <!-- If this PR is related to an unstable feature or an otherwise tracked effort, please link to the relevant tracking issue here. If you don't know of a related tracking issue or there are none, feel free to ignore this. This PR will get automatically assigned to a reviewer. In case you would like a specific user to review your work, you can assign it to them by using r​? <reviewer name> -->
2024-07-17Prevent double reference in generic futexChris Denton-1/+1
2024-06-04Windows: Use futex implementation for `Once`Timo Kröger-0/+1
Keep the queue implementation for win7. Inspired by PR #121956
2024-03-12std: move `Once` implementations to `sys`joboet-0/+576