| 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 | |
| 159 | public: |
| 160 | UniqueLock(Mutex& mutexIn, const char* pszName, const char* pszFile, int nLine, bool fTry = false) EXCLUSIVE_LOCK_FUNCTION(mutexIn) : Base(mutexIn, std::defer_lock) |
no test coverage detected