Skip to content

Commit 5574e6e

Browse files
committed
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.
1 parent 3aa2581 commit 5574e6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scheduler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class SingleThreadedSchedulerClient
119119
private:
120120
CScheduler* m_pscheduler;
121121

122-
RecursiveMutex m_callbacks_mutex;
122+
Mutex m_callbacks_mutex;
123123
std::list<std::function<void()>> m_callbacks_pending GUARDED_BY(m_callbacks_mutex);
124124
bool m_are_callbacks_running GUARDED_BY(m_callbacks_mutex) = false;
125125

0 commit comments

Comments
 (0)