Acquires a lock on a std::recursive_timed_mutex object
for the current thread.
void lock();
- Preconditions:
The calling thread must not hold a lock on
*this.- 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>