[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. |
CompletWritesAsyncCompleteWritesAsync
|
Closing, decided not to go with the API. |
Implements async
CompleteWritesAsyncwhich will eventually replace syncCompleteWrites.The behavior in this PR now mimics combination of
CompleteWritesandWritesClosed. 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)CompleteWritesAsyncThe behavior is up for discussion, some options:
QuicStreamas it was before this changeCompletWritesAsyncand never throw (Exception is still part ofCompleteWritestask)Unfortunately, this effectively reverts #103902 as the WriteAsync now have to chain to async calls in a row...
Fixes #103434