-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-System.Net.QuicenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions
Milestone
Description
QUIC supports aborting the read or write side of a stream independently from the other side of the stream.
We should determine how to allow a user to do an "abortive dispose" such that all pending I/Os in both directions are aborted.
runtime/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicStream.cs
Lines 313 to 315 in 65587ba
| // TODO do we want this to be a synchronization mechanism to cancel a pending read | |
| // If so, we need to complete the read here as well. | |
| internal override void AbortRead(long errorCode) |
runtime/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicStream.cs
Lines 364 to 381 in 65587ba
| // TODO do anything to stop writes? | |
| using CancellationTokenRegistration registration = cancellationToken.Register(() => | |
| { | |
| bool shouldComplete = false; | |
| lock (_sync) | |
| { | |
| if (_shutdownState == ShutdownWriteState.None) | |
| { | |
| _shutdownState = ShutdownWriteState.Canceled; | |
| shouldComplete = true; | |
| } | |
| } | |
| if (shouldComplete) | |
| { | |
| _shutdownWriteResettableCompletionSource.CompleteException(new OperationCanceledException("Shutdown was canceled")); | |
| } | |
| }); |
Metadata
Metadata
Assignees
Labels
area-System.Net.QuicenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions