|
GMP 0.3.0
Generative Metaprogramming library for C++
|
A minimal spin lock built on std::atomic_flag.
More...
#include <lock.hpp>
Public Member Functions | |
| void | lock () |
| Acquire the lock by spinning until it becomes available. | |
| void | unlock () |
| Release the lock. | |
spin_lock provides a tiny mutual-exclusion primitive for short critical sections. It repeatedly attempts to acquire the lock until it succeeds.