Bitcoin ABC 0.30.5
P2P Digital Currency
List of all members
GlobalMutex Class Reference

Different type to mark Mutex at global scope. More...

#include <sync.h>

Inheritance diagram for GlobalMutex:
[legend]
Collaboration diagram for GlobalMutex:
[legend]

Additional Inherited Members

- Public Types inherited from AnnotatedMixin< std::mutex >
using UniqueLock = std::unique_lock< std::mutex >
 
- Public Member Functions inherited from AnnotatedMixin< std::mutex >
 ~AnnotatedMixin ()
 
void lock () EXCLUSIVE_LOCK_FUNCTION()
 
void unlock () UNLOCK_FUNCTION()
 
bool try_lock () EXCLUSIVE_TRYLOCK_FUNCTION(true)
 

Detailed Description

Different type to mark Mutex at global scope.

Thread safety analysis can't handle negative assertions about mutexes with global scope well, so mark them with a separate type, and eventually move all the mutexes into classes so they are not globally visible.

See: https://github.com/bitcoin/bitcoin/pull/20272#issuecomment-720755781

Definition at line 144 of file sync.h.


The documentation for this class was generated from the following file: