cpp/thread/shared timed mutex/try lock shared for

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

If is less or equal, the function behaves like try_lock_shared.

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.

As with try_lock_shared, this function is allowed to fail spuriously and return even if the mutex was not locked by any other thread at some point during.

Prior unlock operation on the same mutex synchronizes-with (as defined in std) this operation if it returns.

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

Return value
if the lock was acquired successfully, otherwise.

Exceptions
Any exception thrown by clock, time_point, or duration during the execution (clocks, time points, and durations provided by the standard library never throw)