Types of Locks: std::unique_lock
This lesson gives an overview of std::unique_lock which is a type of lock used in C++.
We'll cover the following...
Features
In addition to what’s offered by a std::lock_guard
, a std::unique_lock
enables you to
- create it without an associated mutex.
- create it without locking the associated mutex.
- explicitly and repeatedly set or release the lock of the associated mutex.
- move the mutex.
- try to lock the mutex.
- delay the lock on the associated mutex.
Methods
The following table shows the methods of a std::unique_lock lk
. ...
Access this course and 1400+ top-rated courses and projects.