std::unique_lock
From cppreference.com
Template:cpp/thread/unique lock/sidebar
Defined in header <mutex>
|
||
template< class Mutex > class unique_lock; |
Template:mark c++11 feature | |
The class Template:cpp implements general-purpose mutex ownership wrapper allowing deferred locking, timed locking, recursive locking, transfer of lock ownership, and use with condition variables. The class is non-copyable but movable.
Contents |
Member types
Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list end
Member functions
constructs a unique_lock, optionally locking the supplied mutex (public member function) | |
unlocks the supplied mutex, if owned (public member function) | |
unlocks the mutex, if owned, and acquires ownership of another (public member function) | |
locks the supplied mutex (public member function) | |
attempts to lock the supplied mutex (public member function) | |
attempts to lock the supplied TimedLockable mutex for specified Template:cpp (public member function) | |
attempts to lock the supplied TimedLockable mutex until specified Template:cpp (public member function) | |
unlocks the supplied mutex (public member function) | |
swaps state with another Template:cpp (public member function) | |
returns a pointer to the supplied mutex (public member function) | |
unlocks the mutex and returns a pointer to the mutex object (public member function) | |
tests if this unique_lock owns its mutex (public member function) | |
tests if this unique_lock owns its mutex (public member function) |
Helper classes
tag type used to disambiguate unique_lock constructors (class) | |
tag type used to disambiguate unique_lock constructors (class) | |
tag type used to disambiguate unique_lock constructors (class) |
Non-member constants
tag constant used to disambiguate unique_lock constructors (constant) | |
tag constant used to disambiguate unique_lock constructors (constant) | |
tag constant used to disambiguate unique_lock constructors (constant) |
Non-member functions
Specialization of std::swap for unique_locks (function template) |