Public Member Functions | |
virtual void | EnterToRead ()=0 |
Lock to allow read access. Queues readers if the lock is locked for a writer or if there are writers waiting on the existing readers. Allows any number of threads to enter as a reader at the same time and allows the same thread to enter as a reader multiple times. | |
virtual bool | TryEnterToRead ()=0 |
Attempt to lock to allow read access. Returns false if the lock is locked for a writer or if there are writers waiting on the existing readers. Allows any number of threads to enter as a reader at the same time and allows the same thread to enter as a reader multiple times. | |
virtual void | EnterToWrite ()=0 |
Lock to allow write access. Queues writers if the lock is locked for a reader or a writer. Allows one thread to enter as a writer at any one time. | |
virtual bool | TryEnterToWrite ()=0 |
Attempt to lock to allow write access. Returns false if the lock is locked for a reader or a writer. Allows one thread to enter as a writer at any one time. | |
virtual void | ConvertFromWriteToRead ()=0 |
Convert from write access to read access. | |
virtual void | Leave ()=0 |
Unlock. | |
Protected Member Functions | |
virtual | ~ISingleWriterMultipleReaderLock () |
Classes | |
class | ConditionalOwner |
A base class to support the ConditionalReader and ConditionalWriter classes. More... | |
class | ConditionalReader |
A class that may lock an instance of ISingleWriterMultipleReaderLock for read access. That is it calls EnterToRead() in the constructor and Leave() in the destructor if locked is true and can therefore be used to support scope based locking and unlocking. More... | |
class | ConditionalWriter |
A class that may lock an instance of ISingleWriterMultipleReaderLock for write access. That is it calls EnterToWrite() in the constructor and Leave() in the destructor if locked is true and can therefore be used to support scope based locking and unlocking. More... | |
class | PotentialOwner |
A base class to support the PotentialReader and PotentialWriter classes. More... | |
class | PotentialReader |
A class that may lock an instance of ISingleWriterMultipleReaderLock for read access. If you call EnterToRead() or TryEnterToRead() on this class it will keep track of the fact that the lock has been entered and will call Leave() in the destructor. This can therefore be used to support scope based locking and unlocking of instances of ISingleWriterMultipleReaderLock. More... | |
class | PotentialWriter |
A class that may lock an instance of ISingleWriterMultipleReaderLock for write access. If you call EnterToWrite() or TryEnterToWrite() on this class it will keep track of the fact that the lock has been entered and will call Leave() in the destructor. This can therefore be used to support scope based locking and unlocking of instances of ISingleWriterMultipleReaderLock. More... | |
class | Reader |
A class that locks an instance of ISingleWriterMultipleReaderLock for read access. That is it calls EnterToRead() in the constructor and Leave() in the destructor and can therefore be used to support scope based locking and unlocking. More... | |
class | Writer |
A class that locks an instance of ISingleWriterMultipleReaderLock for write access. That is it calls EnterToWrite() in the constructor and Leave() in the destructor and can therefore be used to support scope based locking and unlocking. More... |
virtual ~ISingleWriterMultipleReaderLock | ( | ) | [protected, virtual] |
virtual void EnterToRead | ( | ) | [pure virtual] |
Lock to allow read access. Queues readers if the lock is locked for a writer or if there are writers waiting on the existing readers. Allows any number of threads to enter as a reader at the same time and allows the same thread to enter as a reader multiple times.
virtual bool TryEnterToRead | ( | ) | [pure virtual] |
Attempt to lock to allow read access. Returns false if the lock is locked for a writer or if there are writers waiting on the existing readers. Allows any number of threads to enter as a reader at the same time and allows the same thread to enter as a reader multiple times.
virtual void EnterToWrite | ( | ) | [pure virtual] |
Lock to allow write access. Queues writers if the lock is locked for a reader or a writer. Allows one thread to enter as a writer at any one time.
virtual bool TryEnterToWrite | ( | ) | [pure virtual] |
Attempt to lock to allow write access. Returns false if the lock is locked for a reader or a writer. Allows one thread to enter as a writer at any one time.
virtual void ConvertFromWriteToRead | ( | ) | [pure virtual] |
Convert from write access to read access.
virtual void Leave | ( | ) | [pure virtual] |
Unlock.