summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskCompletionSource.cs
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2019-07-17 13:01:37 -0400
committerStephen Toub <stoub@microsoft.com>2019-07-18 14:25:53 -0400
commitf9d0787a1aa181651cd2362bb20d2ccbf5de5a69 (patch)
tree189911f53d045d61f6afafdeb04debafef34cf62 /src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskCompletionSource.cs
parent3c0368e2854e969c20e96984d9978f3d7f7a18a2 (diff)
downloadcoreclr-f9d0787a1aa181651cd2362bb20d2ccbf5de5a69.tar.gz
coreclr-f9d0787a1aa181651cd2362bb20d2ccbf5de5a69.tar.bz2
coreclr-f9d0787a1aa181651cd2362bb20d2ccbf5de5a69.zip
Remove now unnecessary !s / TODO-NULLABLE comments (#25749)
* Remove !s and TODO-NULLABLE comments for [DoesNotReturn] * Remove !s and TODO-NULLABLE comments for [NotNullIfNotNull] * Remove !s and TODO-NULLABLE comments for writes via Interlocked.CompareExchange * Remove !s and TODO-NULLABLE comments for Debug.Assert on fields * Update/add several TODO-NULLABLE comments
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskCompletionSource.cs')
-rw-r--r--src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskCompletionSource.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskCompletionSource.cs b/src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskCompletionSource.cs
index b0c79e61ba..71a7e22ebd 100644
--- a/src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskCompletionSource.cs
+++ b/src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskCompletionSource.cs
@@ -150,7 +150,7 @@ namespace System.Threading.Tasks
{
if (exception == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception);
- bool rval = _task.TrySetException(exception!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
+ bool rval = _task.TrySetException(exception);
if (!rval && !_task.IsCompleted) SpinUntilCompleted();
return rval;
}
@@ -180,11 +180,11 @@ namespace System.Threading.Tasks
if (exceptions == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exceptions);
List<Exception> defensiveCopy = new List<Exception>();
- foreach (Exception e in exceptions!) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
+ foreach (Exception e in exceptions)
{
if (e == null)
ThrowHelper.ThrowArgumentException(ExceptionResource.TaskCompletionSourceT_TrySetException_NullException, ExceptionArgument.exceptions);
- defensiveCopy.Add(e!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
+ defensiveCopy.Add(e);
}
if (defensiveCopy.Count == 0)
@@ -216,7 +216,7 @@ namespace System.Threading.Tasks
{
if (exception == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception);
- if (!TrySetException(exception!)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
+ if (!TrySetException(exception))
{
ThrowHelper.ThrowInvalidOperationException(ExceptionResource.TaskT_TransitionToFinal_AlreadyCompleted);
}