Releases: botahamec/happylock
Releases · botahamec/happylock
v0.2
A big update which utilizes cyclic wait prevention for better performance. Also, the Sharable
API is here.
Breaking Changes
LockCollection
has been replaced with four different lock collection types. A sensible default is still aliased asLockCollection
- The
Lockable
trait has been removed, and replaced with two new traits: a new trait sharing the same name (Lockable
), andRawLock
OwnedLockable
no longer has a lifetime. Why did I ever give it one?Lockable
andOwnedLockable
are no longer top-level exports. They're hidden in thelockable
module now.Mutex::get_mut
andRwLock::get_mut
have been removed. Useas_mut
instead.- A few methods are now
must_use
Minor Changes
- Updated documentation and examples
ReadLock
andWriteLock
are nowrepr(transparent)
unsafe fn RwLock::raw()
unsafe fn Mutex::raw()
impl<...> Default for Mutex<T, R>
impl<...> Default for RwLock<T, R>
impl<...> Debug for MutexRef<'a, T, R>
impl<...> Display for MutexRef<'a, T, R>
impl<...> Debug for MutexGuard<'a, 'key, T, Key, R>
impl<...> Display for MutexGuard<'a, 'key, T, Key, R>
impl<...> Debug for RwLockReadRef<'a, T, R>
impl<...> Display for RwLockReadRef<'a, T, R>
impl<...> Debug for RwLockReadGuard<'a, 'key, T, Key, R>
impl<...> Display for RwLockReadGuard<'a, 'key, T, Key, R>
impl<...> AsRef<T> for MutexRef<'a, T, R>
impl<...> AsMut<T> for MutexRef<'a, T, R>
impl<...> AsRef<T> for MutexGuard<'a, 'key, T, Key, R>
impl<...> AsMut<T> for MutexGuard<'a, 'key, T, Key, R>
impl<...> AsRef<T> for RwLockReadRef<'a, T, R>
impl<...> AsRef<T> for RwLockReadGuard<'a, 'key, T, Key, R>
impl<...> AsRef<T> for RwLockWriteRef<'a, T, R>
impl<...> AsMut<T> for RwLockWriteRef<'a, T, R>
impl<...> AsRef<T> for RwLockWriteGuard<'a, 'key, T, Key, R>
impl<...> AsMut<T> for RwLockWriteGuard<'a, 'key, T, Key, R>
Bug fixes
- The
Debug
format forWriteLock
no longer saysReadLock
Full Changelog: v0.1.5...v0.2
v0.1.5
v0.1.2
I made some performance improvements that didn't require breaking changes:
LockCollection<[T; N]>
,LockCollection<Box<[T]>>
andLockCollection<Vec<T>>
now behave less like spinlocks when their first element isn't locked- Added notes for how
LockCollection
should be used with tuples - Sorted the list of pointers in
try_new
before doing the comparison