Template:cpp/thread/mutex/try lock until

Tries to lock the mutex. Blocks until specified has been reached or the lock is acquired, whichever comes first. On successful lock acquisition returns, otherwise returns.

If has already passed, this function behaves like try_lock.

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

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

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)