Expose SpinWait.SpinOnce(int sleep1Threshold) overload (dotnet/coreclr#18204)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Sun, 15 Jul 2018 18:18:06 +0000 (11:18 -0700)
committerGitHub <noreply@github.com>
Sun, 15 Jul 2018 18:18:06 +0000 (11:18 -0700)
commit6caee2a986ae9e7a7ec9cbab6c7b131f721548b0
tree31825eed01217a2e7b17d43c384509f7e8b0048e
parent4406882e8cbe6c547bacbbac8b020f5ac9066c26
Expose SpinWait.SpinOnce(int sleep1Threshold) overload (dotnet/coreclr#18204)

Expose SpinWait.SpinOnce(int sleep1Threshold) overload

To allow customizing the spin count threshold for Sleep(1) usage, and to allow disabling the use of Sleep(1).

API review: https://github.com/dotnet/corefx/issues/29623
Part of fix for https://github.com/dotnet/corefx/issues/29595

Commit migrated from https://github.com/dotnet/coreclr/commit/28a8d423efc79c1cb2b23fa21747c5f7c5f7a057
src/coreclr/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs
src/libraries/System.Private.CoreLib/src/System/Threading/ManualResetEventSlim.cs
src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreSlim.cs
src/libraries/System.Private.CoreLib/src/System/Threading/SpinWait.cs