mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 18:09:47 +01:00
refactor: replace RecursiveMutex m_callbacks_mutex
with Mutex
In each of the critical sections, only the the guarded variables are accessed, without any chance that within one section another one is called. Hence, we can use an ordinary Mutex instead of RecursiveMutex.
This commit is contained in:
parent
3aa258109e
commit
5574e6ed52
@ -119,7 +119,7 @@ class SingleThreadedSchedulerClient
|
||||
private:
|
||||
CScheduler* m_pscheduler;
|
||||
|
||||
RecursiveMutex m_callbacks_mutex;
|
||||
Mutex m_callbacks_mutex;
|
||||
std::list<std::function<void()>> m_callbacks_pending GUARDED_BY(m_callbacks_mutex);
|
||||
bool m_are_callbacks_running GUARDED_BY(m_callbacks_mutex) = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user