|
lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
Implements a simple binary spin lock that is NOT reentrant. More...
#include <spin_lock.h>
Inherits noncopyable.
Public Member Functions | |
| spin_lock () | |
| Constructs a binary spin lock. | |
| LEAN_INLINE bool | try_lock () |
| Tries to lock this spin lock, returning false if currenty locked by another user. | |
| LEAN_INLINE void | lock () |
| Locks this spin lock, returning immediately on success, otherwise waiting for the lock to become unlocked. | |
| LEAN_INLINE void | unlock () |
| Unlocks this spin lock, permitting waiting threads to continue execution. | |
Implements a simple binary spin lock that is NOT reentrant.
1.7.6.1