spin
Spin-based synchronization primitives
0.12.3
617M downloads/mo
#149 most downloaded on crates.io
source
What this package is like to depend on
Last release 6 days ago
17 Aug 2026
Ships unpredictably
gaps range from 2 weeks to 2.0 years
Rarely documented
notes for 3 of 33 stable releases
16 versions withdrawn
withdrawn after publishing
12 years old
49 releases · first in 2015
10 releases in the last 12 months
see the full history below
Release timeline
49 releases · Jan 2015 to Aug 2026Releases
latest 49-
0.12.317 Aug 2026 -
0.12.213 Jul 2026Release notes
Open source →Fixed
- Unsoundness in
Once::force_into_inner,Once::try_into_inner, andOnce::into_inner_unchecked. Thanks to@Poseidonfor catching this.
- Unsoundness in
-
0.12.123 Jun 2026 withdrawnRelease notes
Open source →Fixed
-
Unsoundness in
RwLock'stry_upgradepath for thelock_apiinterface has been fixed. Note that this unsoundness only affects you if all of the following apply:- You use
RwLockvia thelock_apiinterface specifically - You call
upgradable_readto create an upgradeable lock guard - You call
try_upgradeon the upgradeable lock guard
- You use
-
LazyLock'sSyncimplementation is now less restrictive
-
-
0.12.020 May 2026 withdrawnRelease notes
Open source →Changed
- Moved to Codeberg
Fixed
- Unsoundness in
FairMutexcaused by an undue extension of a reference lifetime outside of a critical section. Note that we do not consider this CVE-worthy since there's no clear path to exploiting this and there's no clear reason for the compiler to actually generate code that falls afoul of the issue. If you have found an example of this issue leading to unexpected behaviour in practice, please open an issue.
-
0.11.113 Jul 2026Nothing published for this version
-
0.11.014 May 2026 withdrawnRelease notes
Open source →Added
lock_apimapped read/write guard forRwLockOnce::init_from_refrustc-dep-of-stdfeature, allowingspinto be used as a standard library dependency
Changed
- MSRV is now
1.71 Lazyis nowLazyLock
Fixed
lock_apifeature name forRawRwLockUpgradeDowngrade
-
0.10.113 Jul 2026Nothing published for this version
-
0.10.026 Mar 2025 withdrawnRelease notes
Open source →Added
Mutex::try_lock_weakRwLock::try_write_weakRwLock::try_upgrade_weak
Changed
- Updated MSRV to 1.60
- Use
dep:syntax in Cargo.toml portable_atomicfeature has been renamed toportable-atomic, for consistency.
Fixed
-
0.9.913 Jul 2026Nothing published for this version
-
0.9.803 Apr 2023 withdrawn -
0.9.727 Mar 2023 withdrawn -
0.9.613 Mar 2023 withdrawnRelease notes
Open source →Fixed
- Relaxed accidentally restricted
Send/Syncbounds forRwLockguards
- Relaxed accidentally restricted
-
0.9.507 Feb 2023 withdrawnRelease notes
Open source →Added
FairMutex, a new mutex implementation that reduces writer starvation.- A MSRV policy: Rust 1.38 is currently required
Changed
- The crate's CI now has full MIRI integration, further improving the confidence you can have in the implementation.
Fixed
- 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
-
0.9.414 Jul 2022 withdrawnRelease notes
Open source →Fixed
- Fixed unsoundness in
RwLockon reader overflow - Relaxed
Send/Syncbounds forSpinMutexandTicketMutex(doesn't affectMutexitself)
- Fixed unsoundness in
-
0.9.317 Apr 2022 withdrawnRelease notes
Open source →Added
- Implemented
DefaultforOnce Once::try_call_once
Fixed
- Fixed bug that caused
Once::call_onceto incorrectly fail
- Implemented
-
0.9.209 Jul 2021 withdrawnRelease notes
Open source →Changed
- Improved
Onceperformance by reducing the memory footprint of internal state to one byte
Fixed
- Improved performance of
Onceby relaxing ordering guarantees and removing redundant checks
- Improved
-
0.9.120 Jun 2021 withdrawn -
0.9.018 Mar 2021 withdrawnRelease notes
Open source →Changed
- Placed all major API features behind feature flags
Fixed
- A compilation bug with the
lock_apifeature
-
0.8.113 Jul 2026Nothing published for this version
-
0.8.015 Mar 2021 withdrawnRelease notes
Open source →Added
Once::get_uncheckedRelaxStrategytrait with type parameter on all locks to support switching between relax strategies
Changed
lock_api1feature is now namedlock_api
-
0.7.213 Jul 2026Nothing published for this version
-
0.7.112 Jan 2021 withdrawn -
0.7.018 Oct 2020 withdrawnRelease notes
Open source →Added
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
Changed
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
-
0.6.008 Oct 2020Release notes
Open source →Added
- More dynamic
Send/Syncbounds for lock guards lock_apicompatibilityGuard::leakmethodsRwLock::reader_countandRwLock::writer_countDisplayimplementation for guard types
Changed
- Made
Debugimpls of lock guards just show the inner type likestd
- More dynamic
-
0.5.227 Aug 2019Nothing published for this version
-
0.5.107 Aug 2019Nothing published for this version
-
0.5.008 Jan 2019Nothing published for this version
-
0.4.1030 Oct 2018Nothing published for this version
-
0.4.914 Aug 2018Nothing published for this version
-
0.4.820 Apr 2018Nothing published for this version
-
0.4.713 Mar 2018Nothing published for this version
-
0.4.625 Sep 2017Nothing published for this version
-
0.4.529 Oct 2016Nothing published for this version
-
0.4.410 Sep 2016Nothing published for this version
-
0.4.317 Jun 2016Nothing published for this version
-
0.4.220 May 2016Nothing published for this version
-
0.4.113 May 2016Nothing published for this version
-
0.4.018 Apr 2016Nothing published for this version
-
0.3.510 Jan 2016Nothing published for this version
-
0.3.417 Sep 2015Nothing published for this version
-
0.3.325 Aug 2015Nothing published for this version
-
0.3.216 Aug 2015Nothing published for this version
-
0.3.102 Jul 2015Nothing published for this version
-
0.3.026 Jun 2015Nothing published for this version
-
0.2.118 Apr 2015Nothing published for this version
-
0.2.004 Apr 2015Nothing published for this version
-
0.1.404 Apr 2015Nothing published for this version
-
0.1.330 Jan 2015Nothing published for this version
-
0.1.227 Jan 2015Nothing published for this version