From ff06926897fcac1d83baae1782f0c5248b912d06 Mon Sep 17 00:00:00 2001 From: Alfred Myers Date: Thu, 7 Jun 2018 04:06:45 -0300 Subject: [PATCH] Fixed a couple of comments about ArgumentException on timeout parameters (dotnet/coreclr#18335) Commit migrated from https://github.com/dotnet/coreclr/commit/f4e09d1898a8eb172e5c286102ef9d1269b38666 --- .../src/Internal/Runtime/Augments/RuntimeThread.cs | 2 +- src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeThread.cs b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeThread.cs index 4678be6..80c1159 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeThread.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeThread.cs @@ -175,7 +175,7 @@ namespace Internal.Runtime.Augments ** Returns true if the thread died, or false if the wait timed out. If ** Timeout.Infinite is given as the parameter, no timeout will occur. ** - ** Exceptions: ArgumentException if timeout < 0. + ** Exceptions: ArgumentException if timeout < -1 (Timeout.Infinite). ** ThreadInterruptedException if the thread is interrupted while waiting. ** ThreadStateException if the thread has not been started yet. =========================================================================*/ diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs index dee4118..be7bded 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs @@ -105,7 +105,7 @@ namespace System.Threading ** becomes equivalent to Enter. ** ** Exceptions: ArgumentNullException if object is null. - ** ArgumentException if timeout < 0. + ** ArgumentException if timeout < -1 (Timeout.Infinite). =========================================================================*/ // The JIT should inline this method to allow check of lockTaken argument to be optimized out // in the typical case. Note that the method has to be transparent for inlining to be allowed by the VM. -- 2.7.4