Documentation Home

Acquires an exclusive lock on a std::shared_timed_mutex object for the current thread.

void lock();

Preconditions:

The calling thread must not hold a shared or exclusive lock on *this.

Effects:

Blocks the current thread until an exclusive lock on *this can be obtained.

Postconditions:

*this is locked by the calling thread.

Throws:

An exception of type std::system_error if an error occurs.

Header

#include <shared_mutex>

See Also