mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge #11640: Make LOCK, LOCK2, TRY_LOCK work with CWaitableCriticalSection
9c4dc597ddUse LOCK macros for non-recursive locks (Russell Yanofsky)1382913e61Make LOCK, LOCK2, TRY_LOCK work with CWaitableCriticalSection (Russell Yanofsky)ba1f095aadMOVEONLY Move AnnotatedMixin declaration (Russell Yanofsky)41b88e9337Add unit test for DEBUG_LOCKORDER code (Russell Yanofsky) Pull request description: Make LOCK macros work with non-recursive mutexes, and use wherever possible for better deadlock detection. Also add unit test for DEBUG_LOCKORDER code. Tree-SHA512: 64ef209307f28ecd0813a283f15c6406138c6ffe7f6cbbd084161044db60e2c099a7d0d2edcd1c5e7770a115e9b931b486e86c9a777bdc96d2e8a9f4dc192942
This commit is contained in:
commit
385ad11040
14 changed files with 143 additions and 70 deletions
|
|
@ -470,7 +470,7 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
|
|||
{
|
||||
checktxtime = std::chrono::steady_clock::now() + std::chrono::minutes(1);
|
||||
|
||||
WaitableLock lock(g_best_block_mutex);
|
||||
WAIT_LOCK(g_best_block_mutex, lock);
|
||||
while (g_best_block == hashWatchedChain && IsRPCRunning())
|
||||
{
|
||||
if (g_best_block_cv.wait_until(lock, checktxtime) == std::cv_status::timeout)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue