This documentation is archived and is not being maintained.

ReaderWriterLockSlim Members

Visual Studio 2008

Represents a lock that is used to manage access to a resource, allowing multiple threads for reading or exclusive access for writing.

The ReaderWriterLockSlim type exposes the following members.

  NameDescription
Public method ReaderWriterLockSlim Overloaded. Initializes a new instance of the ReaderWriterLockSlim class.
Top

  NameDescription
Public method Dispose Releases all resources used by the current instance of the ReaderWriterLockSlim class.
Public method EnterReadLock Tries to enter the lock in read mode.
Public method EnterUpgradeableReadLock Tries to enter the lock in upgradeable mode.
Public method EnterWriteLock Tries to enter the lock in write mode.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method ExitReadLock Reduces the recursion count for read mode, and exits read mode if the resulting count is 0 (zero).
Public method ExitUpgradeableReadLock Reduces the recursion count for upgradeable mode, and exits upgradeable mode if the resulting count is 0 (zero).
Public method ExitWriteLock Reduces the recursion count for write mode, and exits write mode if the resulting count is 0 (zero).
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryEnterReadLock Overloaded. Tries to enter the lock in read mode, with an optional time-out.
Public method TryEnterUpgradeableReadLock Overloaded. Tries to enter the lock in upgradeable mode, with an optional time-out.
Public method TryEnterWriteLock Overloaded. Tries to enter the lock in write mode, with an optional time-out.
Top

  NameDescription
Public property CurrentReadCount Gets the total number of unique threads that have entered the lock in read mode.
Public property IsReadLockHeld Gets a value that indicates whether the current thread has entered the lock in read mode.
Public property IsUpgradeableReadLockHeld Gets a value that indicates whether the current thread has entered the lock in upgradeable mode.
Public property IsWriteLockHeld Gets a value that indicates whether the current thread has entered the lock in write mode.
Public property RecursionPolicy Gets a value that indicates the recursion policy for the current ReaderWriterLockSlim object.
Public property RecursiveReadCount Gets the number of times the current thread has entered the lock in read mode, as an indication of recursion.
Public property RecursiveUpgradeCount Gets the number of times the current thread has entered the lock in upgradeable mode, as an indication of recursion.
Public property RecursiveWriteCount Gets the number of times the current thread has entered the lock in write mode, as an indication of recursion.
Public property WaitingReadCount Gets the total number of threads that are waiting to enter the lock in read mode.
Public property WaitingUpgradeCount Gets the total number of threads that are waiting to enter the lock in upgradeable mode.
Public property WaitingWriteCount Gets the total number of threads that are waiting to enter the lock in write mode.
Top
Show: