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

Method lock

kdevplatform/language/duchain/duchainlock.cpp:197–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197bool DUChainReadLocker::lock()
198{
199 if (m_locked) {
200 return true;
201 }
202
203 bool l = false;
204 if (m_lock) {
205 l = m_lock->lockForRead(m_timeout);
206 Q_ASSERT(m_timeout || l);
207 }
208 ;
209
210 m_locked = l;
211
212 return l;
213}
214
215void DUChainReadLocker::unlock()
216{

Callers

nothing calls this directly

Calls 2

lockForWriteMethod · 0.80
lockForReadMethod · 0.45

Tested by

no test coverage detected