From fd7057853264956232b14ba111d09fa5758a6027 Mon Sep 17 00:00:00 2001 From: Shen Chen Date: Fri, 18 Sep 2020 17:16:21 -0700 Subject: [PATCH] Change hang to blocking --- src/Workspaces/Remote/Core/BrokeredServiceConnection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Workspaces/Remote/Core/BrokeredServiceConnection.cs b/src/Workspaces/Remote/Core/BrokeredServiceConnection.cs index 484d6f7276d..98ab8b399cc 100644 --- a/src/Workspaces/Remote/Core/BrokeredServiceConnection.cs +++ b/src/Workspaces/Remote/Core/BrokeredServiceConnection.cs @@ -138,8 +138,8 @@ public override async ValueTask> TryInvokeAsync(Solut var (clientStream, serverStream) = FullDuplexStream.CreatePair(); // Create new tasks that both start executing, rather than invoking the delegates directly. - // If the reader started synchronously reading before the writer task started it would hang, and vice versa - // if the writer synchronously filled the buffer before the reader task started it would also hang. + // If the reader started synchronously reading before the writer task started it would be blocking, and vice versa + // if the writer synchronously filled the buffer before the reader task started it would also be blocking. var writerTask = Task.Run(async () => await invocation(service, serverStream, cancellationToken).ConfigureAwait(false), cancellationToken); var readerTask = Task.Run(async () => await reader(clientStream, cancellationToken).ConfigureAwait(false), cancellationToken); await Task.WhenAll(writerTask, readerTask).ConfigureAwait(false); -- GitLab