proxygen
|
#include <LockTraits.h>
Static Public Member Functions | |
static void | lock_upgrade (Mutex &mutex) |
static void | unlock_upgrade (Mutex &mutex) |
static bool | try_lock_upgrade (Mutex &mutex) |
static void | unlock_upgrade_and_lock (Mutex &mutex) |
static void | unlock_and_lock_upgrade (Mutex &mutex) |
static void | unlock_and_lock_shared (Mutex &mutex) |
static void | unlock_upgrade_and_lock_shared (Mutex &mutex) |
![]() | |
static void | lock_shared (Mutex &mutex) |
static void | unlock_shared (Mutex &mutex) |
static bool | try_lock_shared (Mutex &mutex) |
![]() | |
static void | lock (Mutex &mutex) |
static void | unlock (Mutex &mutex) |
static bool | try_lock (Mutex &mutex) |
Static Public Attributes | |
static constexpr bool | is_timed {false} |
static constexpr bool | is_shared {true} |
static constexpr bool | is_upgrade {true} |
![]() | |
static constexpr bool | is_timed {false} |
static constexpr bool | is_shared {true} |
static constexpr bool | is_upgrade {false} |
![]() | |
static constexpr bool | is_timed {false} |
static constexpr bool | is_shared {false} |
static constexpr bool | is_upgrade {false} |
The following methods are supported. There are a few methods
m.lock_upgrade() m.unlock_upgrade() m.try_lock_upgrade()
m.unlock_upgrade_and_lock()
m.unlock_and_lock_upgrade() m.unlock_and_lock_shared() m.unlock_upgrade_and_lock_shared()
m.try_lock_upgrade_for(rel_time) m.try_unlock_upgrade_and_lock_for(rel_time)
Upgrading a shared lock is likely to deadlock when there is more than one thread performing an upgrade. This applies both to upgrading a shared lock to an upgrade lock and to upgrading a shared lock to a unique lock.
Therefore, none of the following methods is supported: unlock_shared_and_lock_upgrade unlock_shared_and_lock try_unlock_shared_and_lock_upgrade try_unlock_shared_and_lock try_unlock_shared_and_lock_upgrade_for try_unlock_shared_and_lock_for
Definition at line 204 of file LockTraits.h.
|
inlinestatic |
Acquire the lock in upgradable mode.
Definition at line 213 of file LockTraits.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Definition at line 207 of file LockTraits.h.
|
static |
Definition at line 206 of file LockTraits.h.
|
static |
Definition at line 208 of file LockTraits.h.