13 #ifndef ROOT_TRWSpinLock 14 #define ROOT_TRWSpinLock 19 #include <condition_variable> 29 std::condition_variable_any
fCond;
34 TRWSpinLock() : fReaders(0), fReaderReservation(0), fWriterReservation(0), fWriter(false) {}
void WriteUnLock()
Release the lock in write mode.
std::condition_variable_any fCond
! RWlock internal condition variable
Namespace for new ROOT classes and functions.
ROOT::TSpinMutex fMutex
! RWlock internal mutex
std::atomic< int > fReaderReservation
! A reader wants access
std::atomic< bool > fWriter
! Is there a writer?
std::atomic< int > fReaders
! Number of readers
A spin mutex class which respects the STL interface for mutexes.
void WriteLock()
Acquire the lock in write mode.
void ReadLock()
Acquire the lock in read mode.
TRWSpinLock()
Regular constructor.
std::atomic< int > fWriterReservation
! A writer wants access
void ReadUnLock()
Release the lock in read mode.