You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -103,33 +105,6 @@ public static Lock Enter(ref this SpinLock spinLock)
103
105
{
104
106
returnnew(refspinLock);
105
107
}
106
-
#else
107
-
/// <summary>
108
-
/// Enters a specified <see cref="SpinLock"/> instance and returns a wrapper to use to release the lock.
109
-
/// This extension should be used though a <see langword="using"/> block or statement:
110
-
/// <code>
111
-
/// private SpinLock spinLock = new SpinLock();
112
-
///
113
-
/// public void Foo()
114
-
/// {
115
-
/// using (SpinLockExtensions.Enter(this, ref spinLock))
116
-
/// {
117
-
/// // Thread-safe code here...
118
-
/// }
119
-
/// }
120
-
/// </code>
121
-
/// The compiler will take care of releasing the SpinLock when the code goes out of that <see langword="using"/> scope.
122
-
/// </summary>
123
-
/// <param name="owner">The owner <see cref="object"/> to create a portable reference for.</param>
124
-
/// <param name="spinLock">The target <see cref="SpinLock"/> to use (it must be within <paramref name="owner"/>).</param>
125
-
/// <returns>A wrapper type that will release <paramref name="spinLock"/> when its <see cref="System.IDisposable.Dispose"/> method is called.</returns>
126
-
/// <remarks>The returned <see cref="Lock"/> value shouldn't be used directly: use this extension in a <see langword="using"/> block or statement.</remarks>
0 commit comments