| 1 |
# Changelog |
| 2 |
|
| 3 |
All notable changes to this project will be documented in this file. |
| 4 |
|
| 5 |
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 |
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 |
|
| 8 |
# Unreleased |
| 9 |
|
| 10 |
### Added |
| 11 |
|
| 12 |
### Changed |
| 13 |
|
| 14 |
### Fixed |
| 15 |
|
| 16 |
# [0.10.1] - 2026-07-13 |
| 17 |
|
| 18 |
### Fixed |
| 19 |
|
| 20 |
- Unsoundness in `Once::force_into_inner`, `Once::try_into_inner`, and |
| 21 |
`Once::into_inner_unchecked`. Thanks to `@Poseidon` for catching this. |
| 22 |
|
| 23 |
# [0.10.0] - 2025-03-26 |
| 24 |
|
| 25 |
### Added |
| 26 |
|
| 27 |
- `Mutex::try_lock_weak` |
| 28 |
- `RwLock::try_write_weak` |
| 29 |
- `RwLock::try_upgrade_weak` |
| 30 |
|
| 31 |
### Changed |
| 32 |
|
| 33 |
- Updated MSRV to 1.60 |
| 34 |
- Use `dep:` syntax in Cargo.toml |
| 35 |
- `portable_atomic` feature has been renamed to `portable-atomic`, for consistency. |
| 36 |
|
| 37 |
### Fixed |
| 38 |
|
| 39 |
# [0.9.8] - 2023-04-03 |
| 40 |
|
| 41 |
### Fixed |
| 42 |
|
| 43 |
- Unsoundness in `Once::try_call_once` caused by an `Err(_)` result |
| 44 |
|
| 45 |
# [0.9.7] - 2023-03-27 |
| 46 |
|
| 47 |
### Fixed |
| 48 |
|
| 49 |
- Relaxed accidentally restricted `Send`/`Sync` bounds for `Mutex` guards |
| 50 |
|
| 51 |
# [0.9.6] - 2023-03-13 |
| 52 |
|
| 53 |
### Fixed |
| 54 |
|
| 55 |
- Relaxed accidentally restricted `Send`/`Sync` bounds for `RwLock` guards |
| 56 |
|
| 57 |
# [0.9.5] - 2023-02-07 |
| 58 |
|
| 59 |
### Added |
| 60 |
|
| 61 |
- `FairMutex`, a new mutex implementation that reduces writer starvation. |
| 62 |
- A MSRV policy: Rust 1.38 is currently required |
| 63 |
|
| 64 |
### Changed |
| 65 |
|
| 66 |
- The crate's CI now has full MIRI integration, further improving the confidence you can have in the implementation. |
| 67 |
|
| 68 |
### Fixed |
| 69 |
|
| 70 |
- Ensured that the crate's abstractions comply with stacked borrows rules. |
| 71 |
- Unsoundness in the `RwLock` that could be triggered via a reader overflow |
| 72 |
- Relaxed various `Send`/`Sync` bound requirements to make the crate more flexible |
| 73 |
|
| 74 |
# [0.9.4] - 2022-07-14 |
| 75 |
|
| 76 |
### Fixed |
| 77 |
|
| 78 |
- Fixed unsoundness in `RwLock` on reader overflow |
| 79 |
- Relaxed `Send`/`Sync` bounds for `SpinMutex` and `TicketMutex` (doesn't affect `Mutex` itself) |
| 80 |
|
| 81 |
# [0.9.3] - 2022-04-17 |
| 82 |
|
| 83 |
### Added |
| 84 |
|
| 85 |
- Implemented `Default` for `Once` |
| 86 |
- `Once::try_call_once` |
| 87 |
|
| 88 |
### Fixed |
| 89 |
|
| 90 |
- Fixed bug that caused `Once::call_once` to incorrectly fail |
| 91 |
|
| 92 |
# [0.9.2] - 2021-07-09 |
| 93 |
|
| 94 |
### Changed |
| 95 |
|
| 96 |
- Improved `Once` performance by reducing the memory footprint of internal state to one byte |
| 97 |
|
| 98 |
### Fixed |
| 99 |
|
| 100 |
- Improved performance of `Once` by relaxing ordering guarantees and removing redundant checks |
| 101 |
|
| 102 |
# [0.9.1] - 2021-06-21 |
| 103 |
|
| 104 |
### Added |
| 105 |
|
| 106 |
- Default type parameter on `Once` for better ergonomics |
| 107 |
|
| 108 |
# [0.9.0] - 2021-03-18 |
| 109 |
|
| 110 |
### Changed |
| 111 |
|
| 112 |
- Placed all major API features behind feature flags |
| 113 |
|
| 114 |
### Fixed |
| 115 |
|
| 116 |
- A compilation bug with the `lock_api` feature |
| 117 |
|
| 118 |
# [0.8.0] - 2021-03-15 |
| 119 |
|
| 120 |
### Added |
| 121 |
|
| 122 |
- `Once::get_unchecked` |
| 123 |
- `RelaxStrategy` trait with type parameter on all locks to support switching between relax strategies |
| 124 |
|
| 125 |
### Changed |
| 126 |
|
| 127 |
- `lock_api1` feature is now named `lock_api` |
| 128 |
|
| 129 |
# [0.7.1] - 2021-01-12 |
| 130 |
|
| 131 |
### Fixed |
| 132 |
|
| 133 |
- Prevented `Once` leaking the inner value upon drop |
| 134 |
|
| 135 |
# [0.7.0] - 2020-10-18 |
| 136 |
|
| 137 |
### Added |
| 138 |
|
| 139 |
- `Once::initialized` |
| 140 |
- `Once::get_mut` |
| 141 |
- `Once::try_into_inner` |
| 142 |
- `Once::poll` |
| 143 |
- `RwLock`, `Mutex` and `Once` now implement `From<T>` |
| 144 |
- `Lazy` type for lazy initialization |
| 145 |
- `TicketMutex`, an alternative mutex implementation |
| 146 |
- `std` feature flag to enable thread yielding instead of spinning |
| 147 |
- `Mutex::is_locked`/`SpinMutex::is_locked`/`TicketMutex::is_locked` |
| 148 |
- `Barrier` |
| 149 |
|
| 150 |
### Changed |
| 151 |
|
| 152 |
- `Once::wait` now spins even if initialization has not yet started |
| 153 |
- `Guard::leak` is now an associated function instead of a method |
| 154 |
- Improved the performance of `SpinMutex` by relaxing unnecessarily conservative |
| 155 |
ordering requirements |
| 156 |
|
| 157 |
# [0.6.0] - 2020-10-08 |
| 158 |
|
| 159 |
### Added |
| 160 |
|
| 161 |
- More dynamic `Send`/`Sync` bounds for lock guards |
| 162 |
- `lock_api` compatibility |
| 163 |
- `Guard::leak` methods |
| 164 |
- `RwLock::reader_count` and `RwLock::writer_count` |
| 165 |
- `Display` implementation for guard types |
| 166 |
|
| 167 |
### Changed |
| 168 |
|
| 169 |
- Made `Debug` impls of lock guards just show the inner type like `std` |