libfilezilla
|
A simple scoped read lock. More...
#include <rwmutex.hpp>
Public Member Functions | |
scoped_write_lock (rwmutex &m) | |
scoped_write_lock (scoped_write_lock const &)=delete | |
scoped_write_lock & | operator= (scoped_write_lock const &)=delete |
scoped_write_lock (scoped_write_lock &&op) noexcept | |
scoped_write_lock & | operator= (scoped_write_lock &&op) noexcept |
void | lock () |
Obtains the mutex. More... | |
void | unlock () |
Releases the mutex. More... | |
A simple scoped read lock.
The lock is acquired on construction and, if still locked, released on destruction. You can manually unlock and re-lock if needed.
|
inline |
Obtains the mutex.
Locking an already locked scoped_write_lock results in undefined behavior.
|
inline |
Releases the mutex.
Releasing a scoped_write_lock that isn't locked results in undefined behavior.