class template
std::unique_lock
- Header
<mutex>- Scope
std- cppreference
- std::unique_lock
Synopsis
template<class Mutex>
class unique_lock;Member types
| Name | Declaration |
|---|---|
mutex_typetype alias · member type | = Mutex |
Member functions
| Name | Declaration |
|---|---|
unique_lockconstructor · 9 overloads | unique_lock() +8 more |
~unique_lockdestructor | ~unique_lock() |
operator=operator · 2 overloads | unique_lock& operator=(const unique_lock& other) +1 more |
lockmember function | void lock() |
mutexmember function | mutex_type* mutex() const |
owns_lockmember function | bool owns_lock() const |
releasemember function | mutex_type* release() |
swapmember function | void swap(unique_lock& u) |
try_lockmember function | bool try_lock() |
try_lock_formember function template | bool try_lock_for(const chrono::duration<Rep, Period>& rel_time) |
try_lock_untilmember function template | bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time) |
unlockmember function | void unlock() |
operator boolconversion function | operator bool() const |