diff options
| author | Russell Yanofsky <[email protected]> | 2017-11-08 17:07:40 -0500 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2018-08-03 07:11:37 -0500 |
| commit | 9c4dc597ddc66acfd58a945a5ab11f833731abba (patch) | |
| tree | 65dd64eda8515ccc9245a1b4bb2211d60c620c07 /src/threadinterrupt.h | |
| parent | Make LOCK, LOCK2, TRY_LOCK work with CWaitableCriticalSection (diff) | |
| download | discoin-9c4dc597ddc66acfd58a945a5ab11f833731abba.tar.xz discoin-9c4dc597ddc66acfd58a945a5ab11f833731abba.zip | |
Use LOCK macros for non-recursive locks
Instead of std::unique_lock.
Diffstat (limited to 'src/threadinterrupt.h')
| -rw-r--r-- | src/threadinterrupt.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/threadinterrupt.h b/src/threadinterrupt.h index d373e3c37..8ba6b1236 100644 --- a/src/threadinterrupt.h +++ b/src/threadinterrupt.h @@ -5,6 +5,8 @@ #ifndef BITCOIN_THREADINTERRUPT_H #define BITCOIN_THREADINTERRUPT_H +#include <sync.h> + #include <atomic> #include <chrono> #include <condition_variable> @@ -28,7 +30,7 @@ public: private: std::condition_variable cond; - std::mutex mut; + CWaitableCriticalSection mut; std::atomic<bool> flag; }; |