SpinLock Methods

The SpinLock type exposes the following members.

  NameDescription
Public method Enter Acquires the lock in a reliable manner, such that even if an exception occurs within the method call, lockTaken can be examined reliably to determine whether the lock was acquired.
Public method Equals Indicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public method Exit() Releases the lock.
Public method Exit(Boolean) Releases the lock.
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 Returns the hash code for this instance. (Inherited from ValueType.)
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 the fully qualified type name of this instance. (Inherited from ValueType.)
Public method TryEnter(Boolean) Attempts to acquire the lock in a reliable manner, such that even if an exception occurs within the method call, lockTaken can be examined reliably to determine whether the lock was acquired.
Public method TryEnter(Int32, Boolean) Attempts to acquire the lock in a reliable manner, such that even if an exception occurs within the method call, lockTaken can be examined reliably to determine whether the lock was acquired.
Public method TryEnter(TimeSpan, Boolean) Attempts to acquire the lock in a reliable manner, such that even if an exception occurs within the method call, lockTaken can be examined reliably to determine whether the lock was acquired.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft