cpp/thread/shared lock/try lock for

Tries to lock the associated mutex in shared mode. Blocks until specified has elapsed or the lock is acquired, whichever comes first. On successful lock acquisition returns, otherwise returns. Effectively calls.

This function may block for longer than due to scheduling or resource contention delays.

The standard recommends that a steady clock is used to measure the duration. If an implementation uses a system clock instead, the wait time may also be sensitive to clock adjustments.

std is thrown if there is no associated mutex or if the mutex is already locked.

The behavior is undefined if does not meet the  requirements.

Return value
if the ownership of the mutex has been acquired successfully, otherwise.

Exceptions

 * Any exceptions thrown by


 * If there is no associated mutex, std with an error code of std


 * If the mutex is already locked, std with an error code of std