You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A nice optimisation provided by bytemuck is the ability to do zeroed heap allocations using calloc safely. Since the default parking_lotMutex and RwLock have an all-zeroes default state, then this means for any safely zeroable type T, RwLock<T> and Mutex<T> are also safely zeroable - and, by extension, FairMutex too. ReentrantMutex is not, however. Implementing these traits - even if behind a feature gate - would make some use-cases using collections of mutexes faster.
The text was updated successfully, but these errors were encountered:
A nice optimisation provided by
bytemuck
is the ability to do zeroed heap allocations usingcalloc
safely. Since the defaultparking_lot
Mutex
andRwLock
have an all-zeroes default state, then this means for any safely zeroable typeT
,RwLock<T>
andMutex<T>
are also safely zeroable - and, by extension,FairMutex
too.ReentrantMutex
is not, however. Implementing these traits - even if behind a feature gate - would make some use-cases using collections of mutexes faster.The text was updated successfully, but these errors were encountered: