LockRecursionPolicy.xml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Type Name="LockRecursionPolicy" FullName="System.Threading.LockRecursionPolicy">
  3. <TypeSignature Language="C#" Value="public enum LockRecursionPolicy" />
  4. <TypeSignature Language="ILAsm" Value=".class public auto ansi serializable sealed LockRecursionPolicy extends System.Enum" />
  5. <AssemblyInfo>
  6. <AssemblyName>System.Core</AssemblyName>
  7. <AssemblyVersion>4.0.0.0</AssemblyVersion>
  8. </AssemblyInfo>
  9. <Base>
  10. <BaseTypeName>System.Enum</BaseTypeName>
  11. </Base>
  12. <Docs>
  13. <remarks>
  14. <attribution license="cc4" from="Microsoft" modified="false" />
  15. <para>The default recursion policy depends on the type of lock. For the default policy and the precise behavior of lock recursion for any given lock type, see the documentation for the type. For example, the <see cref="T:System.Threading.ReaderWriterLockSlim" /> class does not allow a thread to enter the lock in write mode if it already entered the lock in read mode, regardless of the lock policy setting, in order to reduce the chance of deadlocks. </para>
  16. <para>Currently only one lock uses this enumeration:</para>
  17. <list type="bullet">
  18. <item>
  19. <para>
  20. <see cref="T:System.Threading.ReaderWriterLockSlim" />. For more information, see the <see cref="P:System.Threading.ReaderWriterLockSlim.RecursionPolicy" /> property.</para>
  21. </item>
  22. </list>
  23. </remarks>
  24. <summary>
  25. <attribution license="cc4" from="Microsoft" modified="false" />
  26. <para>Specifies whether a lock can be entered multiple times by the same thread.</para>
  27. </summary>
  28. </Docs>
  29. <Members>
  30. <Member MemberName="NoRecursion">
  31. <MemberSignature Language="C#" Value="NoRecursion" />
  32. <MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Threading.LockRecursionPolicy NoRecursion = int32(0)" />
  33. <MemberType>Field</MemberType>
  34. <AssemblyInfo>
  35. <AssemblyVersion>4.0.0.0</AssemblyVersion>
  36. </AssemblyInfo>
  37. <ReturnValue>
  38. <ReturnType>System.Threading.LockRecursionPolicy</ReturnType>
  39. </ReturnValue>
  40. <Docs>
  41. <summary>
  42. <attribution license="cc4" from="Microsoft" modified="false" />
  43. <para>If a thread tries to enter a lock recursively, an exception is thrown. Some classes may allow certain recursions when this setting is in effect. </para>
  44. </summary>
  45. </Docs>
  46. </Member>
  47. <Member MemberName="SupportsRecursion">
  48. <MemberSignature Language="C#" Value="SupportsRecursion" />
  49. <MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Threading.LockRecursionPolicy SupportsRecursion = int32(1)" />
  50. <MemberType>Field</MemberType>
  51. <AssemblyInfo>
  52. <AssemblyVersion>4.0.0.0</AssemblyVersion>
  53. </AssemblyInfo>
  54. <ReturnValue>
  55. <ReturnType>System.Threading.LockRecursionPolicy</ReturnType>
  56. </ReturnValue>
  57. <Docs>
  58. <summary>
  59. <attribution license="cc4" from="Microsoft" modified="false" />
  60. <para>A thread can enter a lock recursively. Some classes may restrict this capability. </para>
  61. </summary>
  62. </Docs>
  63. </Member>
  64. </Members>
  65. </Type>