-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUIC] Adding CompleteWritesAsync
#104032
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
Tagging subscribers to this area: @dotnet/ncl |
But only for the one final write that has await valueTask.ConfigureAwait(false);
if (completeWrites)
{
await _sendTcs.GetFinalTask(this).ConfigureAwait(false);
} to return completeWrites
? WaitForTaskAndSendTcsAsync(valueTask)
: valueTask;
async WaitForTaskAndSendTcsAsync(ValueTask valueTask)
{
await valueTask.ConfigureAwait(false);
await _sendTcs.GetFinalTask(this).ConfigureAwait(false);
} ? We use similar tricks elsewhere in HTTP, e.g. in
Are we exposing the |
Yes and the trick would work 👍
Basically yes. |
CompletWritesAsync
CompleteWritesAsync
Closing, decided not to go with the API. |
Implements async
CompleteWritesAsync
which will eventually replace syncCompleteWrites
.The behavior in this PR now mimics combination of
CompleteWrites
andWritesClosed
. This PR also changes behavior ofWritesAsync(..., completeWrites: true)
to also wait forSEND_SHUTDOWN_COMPLETE
(or abort). This PR brings few breaking behavioral changes:WritesAsync(..., completeWrites: true)
Abort(write)
(RESET_STREAM) or remoteAbort(read)
(STOP_SENDING)CompleteWritesAsync
The behavior is up for discussion, some options:
QuicStream
as it was before this changeCompletWritesAsync
and never throw (Exception is still part ofCompleteWrites
task)Unfortunately, this effectively reverts #103902 as the WriteAsync now have to chain to async calls in a row...
Fixes #103434