зеркало из https://github.com/mozilla/gecko-dev.git
2.0 KiB
2.0 KiB
0.6.3 (2018-07-18)
- Export
RawMutex
,RawRwLock
andRawThreadId
.
0.6.2 (2018-06-18)
- Enable
lock_api/nightly
feature fromparking_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 asMutexGuard::method(self)
. This avoids conflicts with methods from the inner type. MutexGuard
(and other guard types) add theunlocked
method which temporarily unlocks a mutex, runs the given closure, and then re-locks the mutex.MutexGuard
(and other guard types) add thebump
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 themap
method which returns aMappedMutexGuard
which holds only a subset of the original locked type. TheMappedMutexGuard
type is identical toMutexGuard
except that it does not support theunlocked
andbump
methods, and can't be used withCondVar
.