|
Jamba
3.0.2
|
#include <SpinLock.h>
Classes | |
| class | Lock |
Public Member Functions | |
| Lock | acquire () |
| SpinLock & | operator= (SpinLock const &)=delete |
| SpinLock () | |
| SpinLock (SpinLock const &)=delete | |
Private Member Functions | |
| void | unlock () |
Private Attributes | |
| std::atomic_flag | fFlag |
Friends | |
| class | Lock |
A simple implementation of a spin lock using the std::atomic_flag which is guaranteed to be atomic and lock free. The usage is the following:
auto lock = spinLock.acquire(); ...
the lock is released automatically when it exits the scope.
|
inline |
|
delete |
|
inline |
|
inlineprivate |
|
friend |
|
private |