Construct a std::unique_lock
instance associated
with the supplied mutex and tries to acquire a lock on that mutex.
template<typename Rep,typename Period> unique_lock( mutex_type& m, std::chrono::duration<Rep,Period> const& relative_time);
The Mutex
type
used to instantiate std::unique_lock
must meet
the TimedLockable
requirements.
Constructs a std::unique_lock
instance that
references the supplied mutex. Calls m.try_lock_for(relative_time)
.
Nothing.
this->owns_lock()
returns the result of the m.try_lock_for()
call, this->mutex()==&m
.
#include <mutex>