This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
ReaderWriterLock Methods
The methods of the ReaderWriterLock class are listed below. For a complete list of ReaderWriterLock class members, see the ReaderWriterLock Members topic.
Public:
AcquireReaderLock |
Overloaded. Acquires reader lock. Supports nested Reader Locks. The thread will block if a different thread has writer lock. |
AcquireWriterLock |
Overloaded. Acquires writer lock. Supports nested Writer Locks. The thread will block if a different thread has reader lock. It will deadlock if this thread has reader lock. Use UpgradeToWriterLock when you are not sure if the thread has reader lock. |
AnyWritersSince |
Returns true if there were intermediate writes since the sequence number was obtained. The caller should be a reader or writer for getting meaningful results. |
DowngradeFromWriterLock |
Restores the lock status of the thread to the one it was in when it called UpgradeToWriterLock. |
Equals (inherited from Object) |
Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality). |
GetHashCode (inherited from Object) |
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetType (inherited from Object) |
Gets the Type of the Object. |
ReleaseLock |
Releases the lock irrespective of the number of times the thread acquired the lock. |
ReleaseReaderLock |
Releases reader lock. |
ReleaseWriterLock |
Releases writer lock. Removes the thread as a writer if not a nested call to release the lock. |
RestoreLock |
Restores the lock status of the thread to the one it was in when it called ReleaseLock. |
ToString (inherited from Object) |
Returns a String that represents the current Object. |
UpgradeToWriterLock |
Overloaded. Upgrades the thread to a writer. If the thread has is a reader, it is possible that the reader lock was released before writer lock was acquired. |
Protected:
Finalize (inherited from Object) |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere. |
MemberwiseClone (inherited from Object) |
Creates a shallow copy of the current Object. |
See Also
ReaderWriterLock Class | System.Threading Namespace