|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
lock_guard::lock_guard | ||||
explicit lock_guard( mutex_type& m); | (1) | (since C++11) |
lock_guard( mutex_type& m,std::adopt_lock_t t); | (2) | (since C++11) |
lock_guard(const lock_guard&)= delete; | (3) | (since C++11) |
Acquires ownership of the given mutexm.
lock,try_lock,try_lock_for, ortry_lock_until) onm.The behavior is undefined ifm is destroyed before thelock_guard object is.
| m | - | mutex to acquire ownership of |
| t | - | tag parameter used to select non-locking version of the constructor |