Skip to content

Commit 0072bc6

Browse files
committed
Force test re-run
1 parent eeb762a commit 0072bc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Shared/CommunicationsUtilities.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,12 +589,12 @@ internal static int ReadIntForHandshake(this PipeStream stream, byte? byteToAcce
589589
#if !TASKHOST
590590
/// <summary>
591591
/// Allow interop with EAP / Event-based wait handles without additional allocations.
592+
/// By signalling an external reset event, this allows use of WaitHandle.WaitAny() in non-async/await contexts.
592593
/// </summary>
593594
internal static async ValueTask<int> ReadAsync(Stream stream, byte[] buffer, int bytesToRead, AutoResetEvent autoResetEvent)
594595
{
596+
// Signal to the caller only after the read is complete.
595597
int result = await ReadAsync(stream, buffer, bytesToRead).ConfigureAwait(false);
596-
597-
// Signal to the caller that the read is complete.
598598
_ = autoResetEvent.Set();
599599

600600
return result;

0 commit comments

Comments
 (0)