Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WaitForDataAsync()

ValueTask System.Net.Http.Http2Connection.Http2Stream.WaitForDataAsync ( CancellationToken cancellationToken)
inlineprivate

Definition at line 1433 of file Http2Connection.cs.

1434 {
1436 {
1438 bool hasWaiter;
1439 lock (http2Stream.SyncObject)
1440 {
1441 hasWaiter = http2Stream._hasWaiter;
1442 http2Stream._hasWaiter = false;
1443 }
1444 if (hasWaiter)
1445 {
1446 http2Stream._waitSource.SetException(ExceptionDispatchInfo.SetCurrentStackTrace(CancellationHelper.CreateOperationCanceledException(null, cancellationToken)));
1447 }
1448 }, this);
1449 return new ValueTask(this, _waitSource.Version);
1450 }
CancellationTokenRegistration _waitSourceCancellation
ManualResetValueTaskSourceCore< bool > _waitSource
Http2Stream(HttpRequestMessage request, Http2Connection connection)

References System.Net.Http.Http2Connection.Http2Stream.Http2Stream(), System.Net.Http.Http2Connection.Http2Stream._waitSource, System.Net.Http.Http2Connection.Http2Stream._waitSourceCancellation, System.cancellationToken, System.Net.Http.CancellationHelper.CreateOperationCanceledException(), System.s, System.Runtime.ExceptionServices.ExceptionDispatchInfo.SetCurrentStackTrace(), and System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore< TResult >.Version.

Referenced by System.Net.Http.Http2Connection.Http2Stream.CopyToAsync(), System.Net.Http.Http2Connection.Http2Stream.ReadDataAsync(), and System.Net.Http.Http2Connection.Http2Stream.ReadResponseHeadersAsync().