Represents a lock that is used to manage access to a resource, allowing multiple threads for reading or exclusive access for writing.
public ref class ReaderWriterLockSlim : IDisposable
public class ReaderWriterLockSlim : IDisposable
type ReaderWriterLockSlim = class
interface IDisposable
Public Class ReaderWriterLockSlim
Implements IDisposable
For more information about this API, see Supplemental API remarks for ReaderWriterLockSlim.
Constructors Properties CurrentReadCountGets the total number of unique threads that have entered the lock in read mode.
IsReadLockHeldGets a value that indicates whether the current thread has entered the lock in read mode.
IsUpgradeableReadLockHeldGets a value that indicates whether the current thread has entered the lock in upgradeable mode.
IsWriteLockHeldGets a value that indicates whether the current thread has entered the lock in write mode.
RecursionPolicyGets a value that indicates the recursion policy for the current ReaderWriterLockSlim object.
RecursiveReadCountGets the number of times the current thread has entered the lock in read mode, as an indication of recursion.
RecursiveUpgradeCountGets the number of times the current thread has entered the lock in upgradeable mode, as an indication of recursion.
RecursiveWriteCountGets the number of times the current thread has entered the lock in write mode, as an indication of recursion.
WaitingReadCountGets the total number of threads that are waiting to enter the lock in read mode.
WaitingUpgradeCountGets the total number of threads that are waiting to enter the lock in upgradeable mode.
WaitingWriteCountGets the total number of threads that are waiting to enter the lock in write mode.
Methods Thread SafetyThis type is thread safe.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4