cpp/thread/shared mutex/lock shared

Acquires shared ownership of the mutex. If another thread is holding the mutex in exclusive ownership, a call to will block execution until shared ownership can be acquired.

If is called by a thread that already owns the  in any mode (exclusive or shared), the behavior is undefined.

If more than the implementation-defined maximum number of shared owners already locked the mutex in shared mode, blocks execution until the number of shared owners is reduced. The maximum number of owners is guaranteed to be at least 10000.

A prior unlock operation on the same mutex synchronizes-with (as defined in std) this operation.

Parameters
(none)

Return value
(none)

Exceptions
Throws std when errors occur, including errors from the underlying operating system that would prevent from meeting its specifications. The mutex is not locked in the case of any exception being thrown.