File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1- using System ;
1+ #nullable enable
2+ using System ;
23using System . Collections . Generic ;
34using System . Threading . Tasks ;
45
@@ -24,6 +25,9 @@ public AsyncAutoResetEvent(bool initialState)
2425 _isSignaled = initialState ;
2526 }
2627
28+ /// <summary>
29+ /// 析构方法
30+ /// </summary>
2731 ~ AsyncAutoResetEvent ( )
2832 {
2933 Dispose ( ) ;
@@ -68,7 +72,7 @@ public Task<bool> WaitOneAsync()
6872 /// </summary>
6973 public void Set ( )
7074 {
71- TaskCompletionSource < bool > releaseSource = null ;
75+ TaskCompletionSource < bool > ? releaseSource = null ;
7276 bool result ;
7377 lock ( _locker )
7478 {
Original file line number Diff line number Diff line change 1- using System ;
1+ #nullable enable
2+ using System ;
23using System . Collections . Concurrent ;
34using System . Collections . Generic ;
45using System . Threading ;
@@ -96,7 +97,7 @@ public async Task<T> DequeueAsync(CancellationToken cancellationToken = default)
9697 }
9798 }
9899
99- return default ;
100+ return default ! ;
100101 }
101102
102103 /// <summary>
@@ -175,7 +176,7 @@ private void ThrowIfDisposing()
175176 }
176177 }
177178
178- private event EventHandler CurrentFinished ;
179+ private event EventHandler ? CurrentFinished ;
179180
180181 private bool _isDisposing ;
181182 private bool _isDisposed ;
You can’t perform that action at this time.
0 commit comments