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.
pull/826/head
Sebastian Falbesoner 3 years ago
parent 3aa258109e
commit 5574e6ed52

@ -119,7 +119,7 @@ class SingleThreadedSchedulerClient
private: private:
CScheduler* m_pscheduler; CScheduler* m_pscheduler;
RecursiveMutex m_callbacks_mutex; Mutex m_callbacks_mutex;
std::list<std::function<void()>> m_callbacks_pending GUARDED_BY(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; bool m_are_callbacks_running GUARDED_BY(m_callbacks_mutex) = false;

Loading…
Cancel
Save