ReaderWriterLockSlim.RecursionPolicy Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that indicates the recursion policy for the current ReaderWriterLockSlim object.
public:
property System::Threading::LockRecursionPolicy RecursionPolicy { System::Threading::LockRecursionPolicy get(); };
public System.Threading.LockRecursionPolicy RecursionPolicy { get; }
member this.RecursionPolicy : System.Threading.LockRecursionPolicy
Public ReadOnly Property RecursionPolicy As LockRecursionPolicy
Property Value
One of the enumeration values that specifies the lock recursion policy.
Remarks
Recursion policy determines the restrictions on threads that enter the lock more than once. For example, if a lock was created with LockRecursionPolicy.NoRecursion and a thread has entered the lock in read mode, LockRecursionException is thrown if the thread tries to reenter the lock in read mode.
Note
A thread in upgradeable mode can upgrade to write mode or downgrade to read mode regardless of the lock recursion policy setting.
Regardless of recursion policy, a thread that initially entered read mode is not allowed to upgrade to upgradeable mode or write mode, because that pattern creates a strong probability of deadlocks.
For more information about recursion policy and its effects, see the LockRecursionPolicy enumeration and the ReaderWriterLockSlim class.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기