summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2019-06-13 10:03:40 -0400
committerStephen Toub <stoub@microsoft.com>2019-06-13 23:38:44 -0400
commit64ca544ecf55490675e72b853e98ebc8cc75a4fe (patch)
tree7b6b0fdc0bb2302ca93bb0704a624d17d709fd0e /src/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
parente783e68adf65090eb4c701bfccb53294b8a0a596 (diff)
downloadcoreclr-64ca544ecf55490675e72b853e98ebc8cc75a4fe.tar.gz
coreclr-64ca544ecf55490675e72b853e98ebc8cc75a4fe.tar.bz2
coreclr-64ca544ecf55490675e72b853e98ebc8cc75a4fe.zip
Update Corelib to adapt to compiler nullability updates
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs')
-rw-r--r--src/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs b/src/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
index 7554097b1d..20a375135c 100644
--- a/src/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
+++ b/src/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
@@ -152,7 +152,7 @@ namespace System.Threading.Tasks
private CompletionState EnsureCompletionStateInitialized()
{
// ValueLock not needed, but it's ok if it's held
- return LazyInitializer.EnsureInitialized<CompletionState>(ref m_completionState!, () => new CompletionState()); // TODO-NULLABLE: Remove ! when nullable attributes are respected
+ return LazyInitializer.EnsureInitialized(ref m_completionState, () => new CompletionState());
}
/// <summary>Gets whether completion has been requested.</summary>
@@ -382,7 +382,7 @@ namespace System.Threading.Tasks
for (int i = 0; i < m_maxItemsPerTask; i++)
{
// Get the next available exclusive task. If we can't find one, bail.
- Task exclusiveTask;
+ Task? exclusiveTask;
if (!m_exclusiveTaskScheduler.m_tasks.TryDequeue(out exclusiveTask)) break;
// Execute the task. If the scheduler was previously faulted,
@@ -430,7 +430,7 @@ namespace System.Threading.Tasks
for (int i = 0; i < m_maxItemsPerTask; i++)
{
// Get the next available concurrent task. If we can't find one, bail.
- Task concurrentTask;
+ Task? concurrentTask;
if (!m_concurrentTaskScheduler.m_tasks.TryDequeue(out concurrentTask)) break;
// Execute the task. If the scheduler was previously faulted,