Skip to content
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

UsePipe: Completing reader and writer does not dispose PipeStream on .NET Framework #162

Closed
AArnott opened this issue Feb 8, 2020 · 0 comments
Assignees
Labels
Milestone

Comments

@AArnott
Copy link
Collaborator

AArnott commented Feb 8, 2020

When a PipeStream is passed to the UsePipe extension method, completing the returned PipeReader and PipeWriter will not usually dispose of the underlying pipe when on .NET Framework.

See also: dotnet/runtime#31390

.NET Framework does not honor the CancellationToken passed to PipeStream.ReadAsync once the async I/O has been requested.

@AArnott AArnott added the bug label Feb 8, 2020
@AArnott AArnott self-assigned this Feb 8, 2020
@AArnott AArnott added this to the v2.4 milestone Feb 8, 2020
AArnott added a commit that referenced this issue Feb 8, 2020
…Token

`PipeStream.ReadAsync` does not honor `CancellationToken` on .NET Framework.
This change works around this limitation by calling `Stream.Dispose()` when we're sure that the UsePipe front-end user is done using it, which causes the ReadAsync call to complete.

Fixes #162
@AArnott AArnott closed this as completed Feb 9, 2020
AArnott added a commit that referenced this issue Jun 20, 2022
Include only unique coverage reports in artifact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant