Initializes a read/write mutex object with the supplied policy.
This class can be considered a mutex in its own right, and is used to negotiate a read lock for the enclosing mutex.
This class can be considered a mutex in its own right, and is used to negotiate a write lock for the enclosing mutex.
Defines the policy used by this mutex. Currently, two policies are defined.
Gets the policy for the associated mutex.
This class represents a mutex that allows any number of readers to enter, but when a writer enters, all other readers and writers are blocked.
Please note that this mutex is not recursive and is intended to guard access to data only. Also, no deadlock checking is in place because doing so would require dynamic memory allocation, which would reduce performance by an unacceptable amount. As a result, any attempt to recursively acquire this mutex may well deadlock the caller, particularly if a write lock is acquired while holding a read lock, or vice-versa. In practice, this should not be an issue however, because it is uncommon to call deeply into unknown code while holding a lock that simply protects data.