Acquires a lock on a std::recursive_mutex object for the
current thread.
void lock();
- Effects:
Blocks the current thread until a lock on
*thiscan be obtained.- Postconditions:
*thisis locked by the calling thread. If the calling thread already held a lock on*this, the lock count is increased by one.- Throws:
An exception of type
std::system_errorif an error occurs.
Header
#include <mutex>