public member function
<mutex>
template <class Rep, class Period>
bool try_lock_for (const chrono::duration<Rep,Period>& rel_time);
Try to lock for time span
Parameters
rel_time
The maximum time span during which the thread will block, waiting to acquire a lock.
duration is an object that represents a specific relative time.
Return value
true
if the function succeeds in locking the recursive_timed_mutex for the thread.
false
otherwise.
Data races
The recursive_timed_mutex object is accessed/modified as an atomic operation (causes no data races).
Exception safety
Offers the same level of guarantee as the operations on the duration object (for the type instantiations in <chrono>, this is a no-throw guarantee).