All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Unsoundness in
Once::try_call_oncecaused by anErr(_)result
- Relaxed accidentally restricted
Send/Syncbounds forMutexguards
- Relaxed accidentally restricted
Send/Syncbounds forRwLockguards
FairMutex, a new mutex implementation that reduces writer starvation.- A MSRV policy: Rust 1.38 is currently required
- The crate's CI now has full MIRI integration, further improving the confidence you can have in the implementation.
- Ensured that the crate's abstractions comply with stacked borrows rules.
- Unsoundness in the
RwLockthat could be triggered via a reader overflow - Relaxed various
Send/Syncbound requirements to make the crate more flexible
- Fixed unsoundness in
RwLockon reader overflow - Relaxed
Send/Syncbounds forSpinMutexandTicketMutex(doesn't affectMutexitself)
- Implemented
DefaultforOnce Once::try_call_once
- Fixed bug that caused
Once::call_onceto incorrectly fail
- Improved
Onceperformance by reducing the memory footprint of internal state to one byte
- Improved performance of
Onceby relaxing ordering guarantees and removing redundant checks
- Default type parameter on
Oncefor better ergonomics
- Placed all major API features behind feature flags
- A compilation bug with the
lock_apifeature
Once::get_uncheckedRelaxStrategytrait with type parameter on all locks to support switching between relax strategies
lock_api1feature is now namedlock_api
- Prevented
Onceleaking the inner value upon drop
Once::initializedOnce::get_mutOnce::try_into_innerOnce::pollRwLock,MutexandOncenow implementFrom<T>Lazytype for lazy initializationTicketMutex, an alternative mutex implementationstdfeature flag to enable thread yielding instead of spinningMutex::is_locked/SpinMutex::is_locked/TicketMutex::is_lockedBarrier
Once::waitnow spins even if initialization has not yet startedGuard::leakis now an associated function instead of a method- Improved the performance of
SpinMutexby relaxing unnecessarily conservative ordering requirements
- More dynamic
Send/Syncbounds for lock guards lock_apicompatibilityGuard::leakmethodsRwLock::reader_countandRwLock::writer_countDisplayimplementation for guard types
- Made
Debugimpls of lock guards just show the inner type likestd