Documentation Home

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

void lock_shared();

Preconditions:

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

Effects:

Blocks the current thread until a shared 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