gecko-dev/third_party/rust/parking_lot/CHANGELOG.md

2.0 KiB

0.6.3 (2018-07-18)

  • Export RawMutex, RawRwLock and RawThreadId.

0.6.2 (2018-06-18)

  • Enable lock_api/nightly feature from parking_lot/nightly (#79)

0.6.1 (2018-06-08)

Added missing typedefs for mapped lock guards:

  • MappedMutexGuard
  • MappedReentrantMutexGuard
  • MappedRwLockReadGuard
  • MappedRwLockWriteGuard

0.6.0 (2018-06-08)

This release moves most of the code for type-safe Mutex and RwLock types into a separate crate called lock_api. This new crate is compatible with no_std and provides Mutex and RwLock type-safe wrapper types from a raw mutex type which implements the RawMutex or RawRwLock trait. The API provided by the wrapper types can be extended by implementing more traits on the raw mutex type which provide more functionality (e.g. RawMutexTimed). See the crate documentation for more details.

There are also several major changes:

  • The minimum required Rust version is bumped to 1.26.
  • All methods on MutexGuard (and other guard types) are no longer inherent methods and must be called as MutexGuard::method(self). This avoids conflicts with methods from the inner type.
  • MutexGuard (and other guard types) add the unlocked method which temporarily unlocks a mutex, runs the given closure, and then re-locks the mutex.
  • MutexGuard (and other guard types) add the bump method which gives a chance for other threads to acquire the mutex by temporarily unlocking it and re-locking it. However this is optimized for the common case where there are no threads waiting on the lock, in which case no unlocking is performed.
  • MutexGuard (and other guard types) add the map method which returns a MappedMutexGuard which holds only a subset of the original locked type. The MappedMutexGuard type is identical to MutexGuard except that it does not support the unlocked and bump methods, and can't be used with CondVar.