Construct a std::unique_lock instance associated
with the supplied mutex and tries to acquire a lock on that mutex.
template<typename Clock,typename Duration> unique_lock(mutex_type& m,std::chrono::time_point<Clock,Duration> const& absolute_time);
- Preconditions:
The
Mutextype used to instantiatestd::unique_lockmust meet theTimedLockablerequirements.- Effects:
Constructs a
std::unique_lockinstance that references the supplied mutex. Callsm.try_lock_until(absolute_time).- Throws:
Nothing.
- Postcondition:
this->owns_lock()returns the result of them.try_lock_until()call,this->mutex()==&m.
Header
#include <mutex>