about summary refs log tree commit diff
path: root/library/std/src/sync/once.rs
AgeCommit message (Collapse)AuthorLines
2025-01-02Move some things to `std::sync::poison` and reexport them in `std::sync`Pavel Grigorenko-390/+0
2024-10-25library: consistently use American spelling for 'behavior'Ralf Jung-1/+1
2024-09-29Fix std tests for wasm32-wasip2 targetNicola Krumschmidt-1/+1
2024-09-17Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut`Chayim Refael Friedman-0/+10
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-08-01Rollup merge of #127567 - joboet:once_wait, r=AmanieuMatthias Krüger-0/+41
std: implement the `once_wait` feature Tracking issue: #127527 This additionally adds a `wait_force` method to `Once` that doesn't panic on poison. I also took the opportunity and cleaned up up the code of the queue-based implementation a bit.
2024-07-31std: implement the `once_wait` featurejoboet-0/+41
2024-07-30More detailed note to deprecate ONCE_INITLiigo Zhuang-1/+1
2024-06-15std: suggest OnceLock over OnceJubilee Young-3/+12
2024-03-12std: move `Once` implementations to `sys`joboet-1/+1
2023-10-06Minor doc clarification in Once::call_oncePeter Hall-1/+1
2023-06-01doc: improve explanationTshepang Mbambo-1/+1
2023-01-26std: optimize `LazyLock` sizejoboet-0/+16
2022-10-07std: use futex in `Once`joboet-289/+23
2022-04-14Remove use of `#[rustc_deprecated]`Jacob Pratt-2/+2
2022-03-29Make the stdlib largely conform to strict provenance.Aria Beingessner-21/+28
Some things like the unwinders and system APIs are not fully conformant, this only covers a lot of low-hanging fruit.
2022-03-03Add #[track_caller] to track callers when initializing poisoned Oncereez12g-0/+2
2021-12-20impl RefUnwindSafe for OnceDavid Tolnay-2/+5
2021-11-05Add UnwindSafe to OnceMilo-0/+4
2021-10-10Add #[must_use] to core and std constructorsJohn Kugelman-0/+1
2021-07-29Fix may not to appropriate might not or must notAli Malik-1/+1
2021-04-21Replace all `fmt.pad` with `debug_struct`Christiaan Dirkx-1/+1
2021-04-01Fix minor typo in once.rsPredrag Gruevski-1/+1
2021-02-04Stabilize poison API of Once, rename poisoned()Martin Habovstiak-13/+7
This stabilizes: * `OnceState` * `OnceState::is_poisoned()` (previously named `poisoned()`) * `Once::call_once_force()` `poisoned()` was renamed because the new name is more clear as a few people agreed and nobody objected. Closes #33577
2020-12-22Fix documentation typoLinus Färnstrand-1/+1
2020-12-22Migrate standard library away from compare_and_swapLinus Färnstrand-5/+11
2020-09-20Fix nitsAlexis Bourget-2/+1
2020-09-18Finish moving to intra doc links for std::syncAlexis Bourget-36/+26
2020-09-12Mark Once::new as #[inline].Mara Bos-0/+1
Without this, it was not inlined in SyncOnceCell::into_inner(), causing unecessary checks and dead code.
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-120/+3
Also doing fmt inplace as requested.
2020-08-02fix typosliuzhenyu-1/+1
2020-07-27mv std libs to library/mark-0/+690