MCPcopy Create free account
hub / github.com/KDE/kdevelop / lockForegroundMutexInternal

Function lockForegroundMutexInternal

kdevplatform/util/foregroundlock.cpp:26–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24volatile int recursion = 0;
25
26void lockForegroundMutexInternal()
27{
28 if (holderThread == QThread::currentThread()) {
29 // We already have the mutex
30 ++recursion;
31 } else {
32 internalMutex.lock();
33 Q_ASSERT(recursion == 0 && holderThread == nullptr);
34 holderThread = QThread::currentThread();
35 recursion = 1;
36 }
37}
38
39bool tryLockForegroundMutexInternal(int interval = 0)
40{

Callers 3

relockMethod · 0.85
StaticLockMethod · 0.85

Calls 1

lockMethod · 0.45

Tested by

no test coverage detected