Skip to content

v0.4.1

Compare
Choose a tag to compare
@botahamec botahamec released this 07 Jan 14:19
· 1 commit to main since this release

Just a small update.

ThreadKey is now Sync

A &ThreadKey is completely useless, so for the same reason that Exclusive is allowed to be Sync, now the ThreadKey is Sync. This allows MutexGuard to also be Sync, which was a major difference between the standard library and this crate. However, also like the std::sync::MutexGuard, happylock::mutex::MutexGuard will never be Send. Dropping the ThreadKey on the wrong thread could lead to a thread having multiple ThreadKeys. MutexRef can still be Send, as it does not hold a ThreadKey.

Full Changelog: v0.4...v0.4.1