MCPcopy Create free account
hub / github.com/ElementsProject/elements / TryEnter

Function TryEnter

src/sync.h:149–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 }
148
149 bool TryEnter(const char* pszName, const char* pszFile, int nLine)
150 {
151 EnterCritical(pszName, pszFile, nLine, Base::mutex(), true);
152 Base::try_lock();
153 if (!Base::owns_lock()) {
154 LeaveCritical();
155 }
156 return Base::owns_lock();
157 }
158
159public:
160 UniqueLock(Mutex& mutexIn, const char* pszName, const char* pszFile, int nLine, bool fTry = false) EXCLUSIVE_LOCK_FUNCTION(mutexIn) : Base(mutexIn, std::defer_lock)

Callers 1

EXCLUSIVE_LOCK_FUNCTIONFunction · 0.85

Calls 2

EnterCriticalFunction · 0.70
LeaveCriticalFunction · 0.70

Tested by

no test coverage detected