SpinLock.TryEnter Method

.NET Framework (current version)
 

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.

Namespace:   System.Threading
Assembly:  mscorlib (in mscorlib.dll)

NameDescription
System_CAPS_pubmethodTryEnter(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.

System_CAPS_pubmethodTryEnter(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.

System_CAPS_pubmethodTryEnter(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.

Return to top
Show: