Construct a std::unique_lock instance that owns
the lock on the supplied mutex.
unique_lock(mutex_type& m,std::adopt_lock_t);
- Precondition:
The calling thread must own a lock on
m.- Effects:
Constructs a
std::unique_lockinstance that references the supplied mutex and takes ownership of the lock onmheld by the calling thread.- Throws:
Nothing.
- Postcondition:
this->owns_lock()==true,this->mutex()==&m.
Header
#include <mutex>