diff options
| author | Hennadii Stepanov <[email protected]> | 2020-09-19 12:06:36 +0300 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2020-09-19 18:02:42 +0300 |
| commit | 0bd1184adf6610c0bd14f4e9a25c0a200e65ae25 (patch) | |
| tree | 3755ff8cdd8f0202f64684d03511f1fc82fc7f22 /doc/developer-notes.md | |
| parent | Replace LockAssertion with a proper thread safety annotations (diff) | |
| download | discoin-0bd1184adf6610c0bd14f4e9a25c0a200e65ae25.tar.xz discoin-0bd1184adf6610c0bd14f4e9a25c0a200e65ae25.zip | |
Remove unused LockAssertion struct
Diffstat (limited to 'doc/developer-notes.md')
| -rw-r--r-- | doc/developer-notes.md | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md index ef9ecbb08..fa188dbcd 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -793,25 +793,6 @@ bool ChainstateManager::ProcessNewBlock(...) } ``` -- When Clang Thread Safety Analysis is unable to determine if a mutex is locked, use `LockAssertion` class instances: - -```C++ -// net_processing.h -void RelayTransaction(...) EXCLUSIVE_LOCKS_REQUIRED(::cs_main); - -// net_processing.cpp -void RelayTransaction(...) -{ - AssertLockHeld(::cs_main); - - connman.ForEachNode([&txid, &wtxid](CNode* pnode) { - LockAssertion lock(::cs_main); - ... - }); -} - -``` - - Build and run tests with `-DDEBUG_LOCKORDER` to verify that no potential deadlocks are introduced. As of 0.12, this is defined by default when configuring with `--enable-debug`. |