-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Async Console Read Cannot Be Cancelled #100308
Comments
Tagging subscribers to this area: @dotnet/area-system-console |
Searching further, I guess this is more of a feature request and/or a documentation bug/feature request. The documentation states |
Console I/O cannot be canceled reliably on Windows: microsoft/terminal#12143 |
I would very much appreciate upvotes on that issue by anyone who cares about it, by the way. It's hard to convince the team to dedicate time to it if I seem like the only person affected by it. |
I've marked it as blocking, as soon as Windows makes it possible we can give it a try (currently the handle is open for sync IO) |
Description
After beginning an asynchronous stream read of standard input (on Windows at least) with a cancellation token, cancelling the token does not cancel the read.
Reproduction Steps
Expected behavior
Read is cancelled and a cancellation exception is thrown.
Actual behavior
The
await
call blocks forever.Regression?
No response
Known Workarounds
No response
Configuration
.NET 8.0.3
Windows 10 19045.4046
Other information
A stack trace shows the program calling the regular console read method, not an asynchronous version:
The text was updated successfully, but these errors were encountered: