15 virtual void AcquireContextReadLock() = 0;
16 virtual void ReleaseContextReadLock() = 0;
17 virtual void AcquireContextWriteLock() = 0;
18 virtual void ReleaseContextWriteLock() = 0;
27 pthread_rwlock_init(&m_contextReaderWriterLock,
nullptr);
32 pthread_rwlock_destroy(&m_contextReaderWriterLock);
35 void AcquireContextReadLock()
override
37 pthread_rwlock_rdlock(&m_contextReaderWriterLock);
40 void ReleaseContextReadLock()
override
42 pthread_rwlock_unlock(&m_contextReaderWriterLock);
45 void AcquireContextWriteLock()
override
47 pthread_rwlock_wrlock(&m_contextReaderWriterLock);
50 void ReleaseContextWriteLock()
override
52 pthread_rwlock_unlock(&m_contextReaderWriterLock);
57 pthread_rwlock_t m_contextReaderWriterLock;
67 m_guard.AcquireContextWriteLock();
72 m_guard.ReleaseContextWriteLock();