From 5574e6ed52d6effd3b7beff0f09b44449202a585 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Fri, 14 Jan 2022 13:27:41 +0100 Subject: [PATCH] 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. --- src/scheduler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler.h b/src/scheduler.h index 5499110306..bb0abfbf7a 100644 --- a/src/scheduler.h +++ b/src/scheduler.h @@ -119,7 +119,7 @@ class SingleThreadedSchedulerClient private: CScheduler* m_pscheduler; - RecursiveMutex m_callbacks_mutex; + Mutex m_callbacks_mutex; std::list> m_callbacks_pending GUARDED_BY(m_callbacks_mutex); bool m_are_callbacks_running GUARDED_BY(m_callbacks_mutex) = false;