aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-01-14 13:27:41 +0100
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-01-14 13:27:41 +0100
commit5574e6ed52d6effd3b7beff0f09b44449202a585 (patch)
tree0287edbc0070978156c08afa96ebade8453332e2
parent3aa258109e3f3e0b1bfc4f811cbadfd6d516208c (diff)
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.
-rw-r--r--src/scheduler.h2
1 files changed, 1 insertions, 1 deletions
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<std::function<void()>> m_callbacks_pending GUARDED_BY(m_callbacks_mutex);
bool m_are_callbacks_running GUARDED_BY(m_callbacks_mutex) = false;