Use std::atomic for fRequestShutdown and fReopenDebugLog
This commit is contained in:
@@ -124,7 +124,7 @@ static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
|
||||
// shutdown thing.
|
||||
//
|
||||
|
||||
volatile bool fRequestShutdown = false;
|
||||
std::atomic<bool> fRequestShutdown(false);
|
||||
|
||||
void StartShutdown()
|
||||
{
|
||||
|
||||
@@ -112,7 +112,7 @@ string strMiscWarning;
|
||||
bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS;
|
||||
bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS;
|
||||
bool fLogIPs = DEFAULT_LOGIPS;
|
||||
volatile bool fReopenDebugLog = false;
|
||||
std::atomic<bool> fReopenDebugLog(false);
|
||||
CTranslationInterface translationInterface;
|
||||
|
||||
/** Init OpenSSL library multithreading support */
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "tinyformat.h"
|
||||
#include "utiltime.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <exception>
|
||||
#include <map>
|
||||
#include <stdint.h>
|
||||
@@ -59,7 +60,7 @@ extern std::string strMiscWarning;
|
||||
extern bool fLogTimestamps;
|
||||
extern bool fLogTimeMicros;
|
||||
extern bool fLogIPs;
|
||||
extern volatile bool fReopenDebugLog;
|
||||
extern std::atomic<bool> fReopenDebugLog;
|
||||
extern CTranslationInterface translationInterface;
|
||||
|
||||
extern const char * const BITCOIN_CONF_FILENAME;
|
||||
|
||||
Reference in New Issue
Block a user