4 releases
0.1.3 | Jan 10, 2024 |
---|---|
0.1.2 | Oct 27, 2022 |
0.1.1 | Oct 27, 2022 |
0.1.0 | Oct 27, 2022 |
#163 in Concurrency
102,747 downloads per month
Used in 46 crates
(via dhat)
7KB
127 lines
mintex
A minimal Mutex
A drop-in for std::sync::Mutex
which doesn't do poisoning. The lock will spin and yield if the lock isn't acquired. The implementation doesn't attempt to be "fair", but because it's so simple it is fast.
The main reason for it to exist, is because I know it does not allocate memory during execution and that's a desirable feature for some use cases.
I have run the tests under miri and no issues are detected.
Installation
[dependencies]
mintex = "0.1"
License
Apache 2.0 licensed. See LICENSE for details.
lib.rs
:
mintex is a minimal Mutex.
Most of the implementation is lifted from std::sync::Mutex
.
The reason for this mutex existing is that I'd like a mutex which is
quite lightweight and does not perform allocations.