| 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 | ## `parking_lot` - [0.12.5](https://github.com/Amanieu/parking_lot/compare/parking_lot-v0.12.4...parking_lot-v0.12.5) - 2025-09-30 |
| 11 | |
| 12 | - Bumped MSRV to 1.71 |
| 13 | - Fixed Miri when the `hardware-lock-elision` feature is enabled (#491) |
| 14 | - Added missing `into_arc(_fair)` methods (#472) |
| 15 | - Fixed `RawRwLock::bump_*()` not releasing lock when there are multiple readers (#471) |
| 16 | |
| 17 | ## `parking_lot_core` - [0.9.12](https://github.com/Amanieu/parking_lot/compare/parking_lot_core-v0.9.11...parking_lot_core-v0.9.12) - 2025-09-30 |
| 18 | |
| 19 | - Bumped MSRV to 1.71 |
| 20 | - Switched from `windows-targets` to `windows-link`. (#493) |
| 21 | - Replaced `thread-id` dependency with `std::thread::ThreadId` (#483) |
| 22 | - Added SGX implementation for `ThreadParker.park_until` (#481) |
| 23 | |
| 24 | ## `lock_api` - [0.4.14](https://github.com/Amanieu/parking_lot/compare/lock_api-v0.4.13...lock_api-v0.4.14) - 2025-09-30 |
| 25 | |
| 26 | - Fixed use of `doc_cfg` when building on docs.rs. |
| 27 | - Bumped MSRV to 1.71 |
| 28 | - Added `#[track_caller]` where locking implementations could feasibly need to panic |
| 29 | - Added `try_map_or_err` to various mutex guards (#480) |
| 30 | - Removed unnecessary build script and `autocfg` dependency (#474) |
| 31 | - Added missing `into_arc(_fair)` methods (#472) |
| 32 | |
| 33 | ## `parking_lot` - [0.12.4](https://github.com/Amanieu/parking_lot/compare/parking_lot-v0.12.3...parking_lot-v0.12.4) - 2025-05-29 |
| 34 | |
| 35 | - Fix parked upgraders potentially not being woken up after a write lock |
| 36 | - Fix clearing `PARKED_WRITER_BIT` after a timeout |
| 37 | |
| 38 | ## `parking_lot_core` - [0.9.11](https://github.com/Amanieu/parking_lot/compare/parking_lot_core-v0.9.10...parking_lot_core-v0.9.11) - 2025-05-29 |
| 39 | |
| 40 | - Use Release/Acquire ordering in thread_parker::windows::Backend::create |
| 41 | - Remove warnings due to new lint on unknown cfgs |
| 42 | |
| 43 | ## `lock_api` - [0.4.13](https://github.com/Amanieu/parking_lot/compare/lock_api-v0.4.12...lock_api-v0.4.13) - 2025-05-29 |
| 44 | |
| 45 | - Remove warnings due to new lint on unknown cfgs |
| 46 | |
| 47 | ## parking_lot 0.12.3 (2024-05-24) |
| 48 | |
| 49 | - Export types provided by arc_lock feature (#442) |
| 50 | |
| 51 | ## parking_lot 0.12.2, parking_lot_core 0.9.10, lock_api 0.4.12 (2024-04-15) |
| 52 | |
| 53 | - Fixed panic when calling `with_upgraded` twice on a `ArcRwLockUpgradableReadGuard` (#431) |
| 54 | - Fixed `RwLockUpgradeableReadGuard::with_upgraded` |
| 55 | - Added lock_api::{Mutex, ReentrantMutex, RwLock}::from_raw methods (#429) |
| 56 | - Added Apple visionOS support (#433) |
| 57 | |
| 58 | ## parking_lot_core 0.9.9, lock_api 0.4.11 (2023-10-18) |
| 59 | |
| 60 | - Fixed `RwLockUpgradeableReadGuard::with_upgraded`. (#393) |
| 61 | - Fixed `ReentrantMutex::bump` lock count. (#390) |
| 62 | - Added methods to unsafely create a lock guard out of thin air. (#403) |
| 63 | - Added support for Apple tvOS. (#405) |
| 64 | |
| 65 | ## parking_lot_core 0.9.8, lock_api 0.4.10 (2023-06-05) |
| 66 | |
| 67 | - Mark guards with `#[clippy::has_significant_drop]` (#369, #371) |
| 68 | - Removed windows-sys dependency (#374, #378) |
| 69 | - Add `atomic_usize` default feature to support platforms without atomics. (#380) |
| 70 | - Add with_upgraded API to upgradable read locks (#386) |
| 71 | - Make RwLock guards Sync again (#370) |
| 72 | |
| 73 | ## parking_lot_core 0.9.7 (2023-02-01) |
| 74 | |
| 75 | - Update windows-sys dependency to 0.45. (#368) |
| 76 | |
| 77 | ## parking_lot_core 0.9.6 (2023-01-11) |
| 78 | |
| 79 | - Add support for watchOS. (#367) |
| 80 | |
| 81 | ## parking_lot_core 0.9.5 (2022-11-29) |
| 82 | |
| 83 | - Update use of `libc::timespec` to prepare for future libc version (#363) |
| 84 | |
| 85 | ## parking_lot_core 0.9.4 (2022-10-18) |
| 86 | |
| 87 | - Bump windows-sys dependency to 0.42. (#356) |
| 88 | |
| 89 | ## lock_api 0.4.9 (2022-09-20) |
| 90 | |
| 91 | - Fixed `ReentrantMutexGuard::try_map` signature (#355) |
| 92 | |
| 93 | ## lock_api 0.4.8 (2022-08-28) |
| 94 | |
| 95 | - Fixed unsound `Sync`/`Send` impls for `ArcMutexGuard`. (#349) |
| 96 | - Added `ArcMutexGuard::into_arc`. (#350) |
| 97 | |
| 98 | ## parking_lot 0.12.1 (2022-05-31) |
| 99 | |
| 100 | - Fixed incorrect memory ordering in `RwLock`. (#344) |
| 101 | - Added `Condvar::wait_while` convenience methods (#343) |
| 102 | |
| 103 | ## parking_lot_core 0.9.3 (2022-04-30) |
| 104 | |
| 105 | - Bump windows-sys dependency to 0.36. (#339) |
| 106 | |
| 107 | ## parking_lot_core 0.9.2, lock_api 0.4.7 (2022-03-25) |
| 108 | |
| 109 | - Enable const new() on lock types on stable. (#325) |
| 110 | - Added `MutexGuard::leak` function. (#333) |
| 111 | - Bump windows-sys dependency to 0.34. (#331) |
| 112 | - Bump petgraph dependency to 0.6. (#326) |
| 113 | - Don't use pthread attributes on the espidf platform. (#319) |
| 114 | |
| 115 | ## parking_lot_core 0.9.1 (2022-02-06) |
| 116 | |
| 117 | - Bump windows-sys dependency to 0.32. (#316) |
| 118 | |
| 119 | ## parking_lot 0.12.0, parking_lot_core 0.9.0, lock_api 0.4.6 (2022-01-28) |
| 120 | |
| 121 | - The MSRV is bumped to 1.49.0. |
| 122 | - Disabled eventual fairness on wasm32-unknown-unknown. (#302) |
| 123 | - Added a rwlock method to report if lock is held exclusively. (#303) |
| 124 | - Use new `asm!` macro. (#304) |
| 125 | - Use windows-rs instead of winapi for faster builds. (#311) |
| 126 | - Moved hardware lock elision support to a separate Cargo feature. (#313) |
| 127 | - Removed used of deprecated `spin_loop_hint`. (#314) |
| 128 | |
| 129 | ## parking_lot 0.11.2, parking_lot_core 0.8.4, lock_api 0.4.5 (2021-08-28) |
| 130 | |
| 131 | - Fixed incorrect memory orderings on `RwLock` and `WordLock`. (#294, #292) |
| 132 | - Added `Arc`-based lock guards. (#291) |
| 133 | - Added workaround for TSan's lack of support for `fence`. (#292) |
| 134 | |
| 135 | ## lock_api 0.4.4 (2021-05-01) |
| 136 | |
| 137 | - Update for latest nightly. (#281) |
| 138 | |
| 139 | ## lock_api 0.4.3 (2021-04-03) |
| 140 | |
| 141 | - Added `[Raw]ReentrantMutex::is_owned`. (#280) |
| 142 | |
| 143 | ## parking_lot_core 0.8.3 (2021-02-12) |
| 144 | |
| 145 | - Updated smallvec to 1.6. (#276) |
| 146 | |
| 147 | ## parking_lot_core 0.8.2 (2020-12-21) |
| 148 | |
| 149 | - Fixed assertion failure on OpenBSD. (#270) |
| 150 | |
| 151 | ## parking_lot_core 0.8.1 (2020-12-04) |
| 152 | |
| 153 | - Removed deprecated CloudABI support. (#263) |
| 154 | - Fixed build on wasm32-unknown-unknown. (#265) |
| 155 | - Relaxed dependency on `smallvec`. (#266) |
| 156 | |
| 157 | ## parking_lot 0.11.1, lock_api 0.4.2 (2020-11-18) |
| 158 | |
| 159 | - Fix bounds on Send and Sync impls for lock guards. (#262) |
| 160 | - Fix incorrect memory ordering in `RwLock`. (#260) |
| 161 | |
| 162 | ## lock_api 0.4.1 (2020-07-06) |
| 163 | |
| 164 | - Add `data_ptr` method to lock types to allow unsafely accessing the inner data |
| 165 | without a guard. (#247) |
| 166 | |
| 167 | ## parking_lot 0.11.0, parking_lot_core 0.8.0, lock_api 0.4.0 (2020-06-23) |
| 168 | |
| 169 | - Add `is_locked` method to mutex types. (#235) |
| 170 | - Make `RawReentrantMutex` public. (#233) |
| 171 | - Allow lock guard to be sent to another thread with the `send_guard` feature. (#240) |
| 172 | - Use `Instant` type from the `instant` crate on wasm32-unknown-unknown. (#231) |
| 173 | - Remove deprecated and unsound `MappedRwLockWriteGuard::downgrade`. (#244) |
| 174 | - Most methods on the `Raw*` traits have been made unsafe since they assume |
| 175 | the current thread holds the lock. (#243) |
| 176 | |
| 177 | ## parking_lot_core 0.7.2 (2020-04-21) |
| 178 | |
| 179 | - Add support for `wasm32-unknown-unknown` under the "nightly" feature. (#226) |
| 180 | |
| 181 | ## parking_lot 0.10.2 (2020-04-10) |
| 182 | |
| 183 | - Update minimum version of `lock_api`. |
| 184 | |
| 185 | ## parking_lot 0.10.1, parking_lot_core 0.7.1, lock_api 0.3.4 (2020-04-10) |
| 186 | |
| 187 | - Add methods to construct `Mutex`, `RwLock`, etc in a `const` context. (#217) |
| 188 | - Add `FairMutex` which always uses fair unlocking. (#204) |
| 189 | - Fixed panic with deadlock detection on macOS. (#203) |
| 190 | - Fixed incorrect synchronization in `create_hashtable`. (#210) |
| 191 | - Use `llvm_asm!` instead of the deprecated `asm!`. (#223) |
| 192 | |
| 193 | ## lock_api 0.3.3 (2020-01-04) |
| 194 | |
| 195 | - Deprecate unsound `MappedRwLockWriteGuard::downgrade` (#198) |
| 196 | |
| 197 | ## parking_lot 0.10.0, parking_lot_core 0.7.0, lock_api 0.3.2 (2019-11-25) |
| 198 | |
| 199 | - Upgrade smallvec dependency to 1.0 in parking_lot_core. |
| 200 | - Replace all usage of `mem::uninitialized` with `mem::MaybeUninit`. |
| 201 | - The minimum required Rust version is bumped to 1.36. Because of the above two changes. |
| 202 | - Make methods on `WaitTimeoutResult` and `OnceState` take `self` by value instead of reference. |
| 203 | |
| 204 | ## parking_lot_core 0.6.2 (2019-07-22) |
| 205 | |
| 206 | - Fixed compile error on Windows with old cfg_if version. (#164) |
| 207 | |
| 208 | ## parking_lot_core 0.6.1 (2019-07-17) |
| 209 | |
| 210 | - Fixed Android build. (#163) |
| 211 | |
| 212 | ## parking_lot 0.9.0, parking_lot_core 0.6.0, lock_api 0.3.1 (2019-07-14) |
| 213 | |
| 214 | - Re-export lock_api (0.3.1) from parking_lot (#150) |
| 215 | - Removed (non-dev) dependency on rand crate for fairness mechanism, by |
| 216 | including a simple xorshift PRNG in core (#144) |
| 217 | - Android now uses the futex-based ThreadParker. (#140) |
| 218 | - Fixed CloudABI ThreadParker. (#140) |
| 219 | - Fix race condition in lock_api::ReentrantMutex (da16c2c7) |
| 220 | |
| 221 | ## lock_api 0.3.0 (2019-07-03, _yanked_) |
| 222 | |
| 223 | - Use NonZeroUsize in GetThreadId::nonzero_thread_id (#148) |
| 224 | - Debug assert lock_count in ReentrantMutex (#148) |
| 225 | - Tag as `unsafe` and document some internal methods (#148) |
| 226 | - This release was _yanked_ due to a regression in ReentrantMutex (da16c2c7) |
| 227 | |
| 228 | ## parking_lot 0.8.1 (2019-07-03, _yanked_) |
| 229 | |
| 230 | - Re-export lock_api (0.3.0) from parking_lot (#150) |
| 231 | - This release was _yanked_ from crates.io due to unexpected breakage (#156) |
| 232 | |
| 233 | ## parking_lot 0.8.0, parking_lot_core 0.5.0, lock_api 0.2.0 (2019-05-04) |
| 234 | |
| 235 | - Fix race conditions in deadlock detection. |
| 236 | - Support for more platforms by adding ThreadParker implementations for |
| 237 | Wasm, Redox, SGX and CloudABI. |
| 238 | - Drop support for older Rust. parking_lot now requires 1.31 and is a |
| 239 | Rust 2018 edition crate (#122). |
| 240 | - Disable the owning_ref feature by default. |
| 241 | - Fix was_last_thread value in the timeout callback of park() (#129). |
| 242 | - Support single byte Mutex/Once on stable Rust when compiler is at least |
| 243 | version 1.34. |
| 244 | - Make Condvar::new and Once::new const fns on stable Rust and remove |
| 245 | ONCE_INIT (#134). |
| 246 | - Add optional Serde support (#135). |
| 247 | |
| 248 | ## parking_lot 0.7.1 (2019-01-01) |
| 249 | |
| 250 | - Fixed potential deadlock when upgrading a RwLock. |
| 251 | - Fixed overflow panic on very long timeouts (#111). |
| 252 | |
| 253 | ## parking_lot 0.7.0, parking_lot_core 0.4.0 (2018-11-26) |
| 254 | |
| 255 | - Return if or how many threads were notified from `Condvar::notify_*` |
| 256 | |
| 257 | ## parking_lot 0.6.3 (2018-07-18) |
| 258 | |
| 259 | - Export `RawMutex`, `RawRwLock` and `RawThreadId`. |
| 260 | |
| 261 | ## parking_lot 0.6.2 (2018-06-18) |
| 262 | |
| 263 | - Enable `lock_api/nightly` feature from `parking_lot/nightly` (#79) |
| 264 | |
| 265 | ## parking_lot 0.6.1 (2018-06-08) |
| 266 | |
| 267 | Added missing typedefs for mapped lock guards: |
| 268 | |
| 269 | - `MappedMutexGuard` |
| 270 | - `MappedReentrantMutexGuard` |
| 271 | - `MappedRwLockReadGuard` |
| 272 | - `MappedRwLockWriteGuard` |
| 273 | |
| 274 | ## parking_lot 0.6.0 (2018-06-08) |
| 275 | |
| 276 | This release moves most of the code for type-safe `Mutex` and `RwLock` types |
| 277 | into a separate crate called `lock_api`. This new crate is compatible with |
| 278 | `no_std` and provides `Mutex` and `RwLock` type-safe wrapper types from a raw |
| 279 | mutex type which implements the `RawMutex` or `RawRwLock` trait. The API |
| 280 | provided by the wrapper types can be extended by implementing more traits on |
| 281 | the raw mutex type which provide more functionality (e.g. `RawMutexTimed`). See |
| 282 | the crate documentation for more details. |
| 283 | |
| 284 | There are also several major changes: |
| 285 | |
| 286 | - The minimum required Rust version is bumped to 1.26. |
| 287 | - All methods on `MutexGuard` (and other guard types) are no longer inherent |
| 288 | methods and must be called as `MutexGuard::method(self)`. This avoids |
| 289 | conflicts with methods from the inner type. |
| 290 | - `MutexGuard` (and other guard types) add the `unlocked` method which |
| 291 | temporarily unlocks a mutex, runs the given closure, and then re-locks the |
| 292 | mutex. |
| 293 | - `MutexGuard` (and other guard types) add the `bump` method which gives a |
| 294 | chance for other threads to acquire the mutex by temporarily unlocking it and |
| 295 | re-locking it. However this is optimized for the common case where there are |
| 296 | no threads waiting on the lock, in which case no unlocking is performed. |
| 297 | - `MutexGuard` (and other guard types) add the `map` method which returns a |
| 298 | `MappedMutexGuard` which holds only a subset of the original locked type. The |
| 299 | `MappedMutexGuard` type is identical to `MutexGuard` except that it does not |
| 300 | support the `unlocked` and `bump` methods, and can't be used with `CondVar`. |