std::defer_lock_t, std::try_to_lock_t, std::adopt_lock_t
From cppreference.com
struct defer_lock_t { }; |
(since C++11) | |
struct try_to_lock_t { }; |
(since C++11) | |
struct adopt_lock_t { }; |
(since C++11) | |
std::defer_lock_t, std::try_to_lock_t and std::adopt_lock_t are empty struct tag types used to specify locking strategy.
Type | Effect(s) |
defer_lock_t | do not acquire ownership of the mutex |
try_to_t | try to acquire ownership of the mutex without blocking |
adopt_lock_t | assume the calling thread already has ownership of the mutex |
[edit] Example
This section is incomplete Reason: no example |
[edit] See also
tag constants used to specify locking strategy (constant) |