mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Use scoped locks instead of CRITICAL_BLOCK
This commit is contained in:
@@ -40,10 +40,13 @@ void Shutdown(void* parg)
|
||||
static CCriticalSection cs_Shutdown;
|
||||
static bool fTaken;
|
||||
bool fFirstThread = false;
|
||||
TRY_CRITICAL_BLOCK(cs_Shutdown)
|
||||
{
|
||||
fFirstThread = !fTaken;
|
||||
fTaken = true;
|
||||
TRY_LOCK(cs_Shutdown, lockShutdown);
|
||||
if (lockShutdown)
|
||||
{
|
||||
fFirstThread = !fTaken;
|
||||
fTaken = true;
|
||||
}
|
||||
}
|
||||
static bool fExit;
|
||||
if (fFirstThread)
|
||||
|
||||
Reference in New Issue
Block a user