-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Mechanism to cancel reading from standard input #46
Comments
Setting a flag and writing some garbage with |
Then again, setting a flag and sending a signal should work just as well and seems less hacky. No such mechanism on Windows, though. Would also require knowing the thread ID of the reading thread. |
Here's an approach I think is workable and way less hacky.
We will create a pipe on startup. Instead of trying to The This scheme should in principle work the same on Windows - just replace |
Bad news: |
Mostly done in fe53706 (with a kinda gross but functional workaround for Windows). Still need to see if cancellation can somehow be plumbed through for |
It will probably be possible in .NET 7; see: Closing this. |
For input processing we will need to constantly be reading standard in. But we also need a way to cancel that reading so the input thread doesn't just sit there forever.
Investigate how we can do this on each supported platform. Might be worth checking what, if anything, Notcurses does.
The text was updated successfully, but these errors were encountered: