Fix C++17 shared_mutex compile error

In C++17 the method is called: https://en.cppreference.com/w/cpp/thread/shared_mutex/try_lock_shared
This commit is contained in:
Lava Block 2019-12-29 17:12:36 +01:00 committed by GitHub
parent c467e28f2f
commit 361fcfcae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3715,7 +3715,7 @@ void *aligned_alloc(size_t alignment, size_t size)
public: public:
void LockRead() { m_Mutex.lock_shared(); } void LockRead() { m_Mutex.lock_shared(); }
void UnlockRead() { m_Mutex.unlock_shared(); } void UnlockRead() { m_Mutex.unlock_shared(); }
bool TryLockRead() { return m_Mutex.try_shared_lock(); } bool TryLockRead() { return m_Mutex.try_lock_shared(); }
void LockWrite() { m_Mutex.lock(); } void LockWrite() { m_Mutex.lock(); }
void UnlockWrite() { m_Mutex.unlock(); } void UnlockWrite() { m_Mutex.unlock(); }
bool TryLockWrite() { return m_Mutex.try_lock(); } bool TryLockWrite() { return m_Mutex.try_lock(); }