Make SpinLock.TryEnter(ref bool) fail faster
authorStephen Toub <stoub@microsoft.com>
Tue, 31 Jan 2017 19:50:44 +0000 (14:50 -0500)
committerStephen Toub <stoub@microsoft.com>
Tue, 31 Jan 2017 21:13:19 +0000 (16:13 -0500)
commit7ee26ae908da9b1f48c37186b07b3dc860f4f1ba
tree8eb0ca4298cac55671568de78bc905128e80233d
parentb2b3e07625fa3308110d88cd9f013f788e02e5f7
Make SpinLock.TryEnter(ref bool) fail faster

One uses SpinLock.TryEnter(ref bool) when they want to do a quick test to either acquire the lock or know it's held by someone else.  We can make the latter path much faster so that it fails faster.
src/mscorlib/src/System/Threading/SpinLock.cs