-
Notifications
You must be signed in to change notification settings - Fork 715
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a win32 Event to notify the loop in
_Win32Handles
to stop waiti…
…ng for stdin. This fixes a bug where the prompt_toolkit application is stopped by something other than user input. (E.g., a progress bar that terminates.) In that case, the thread which handles the user input will keep running and prevent Python from exiting. In the case of a progress bar, it was even worse, because there we close the asyncio event loop when we finish (because it's a new loop, running in a different thread). And closing the loop causes the `call_soon_threadsafe` in the Win32 handles to raise a `RuntimeError` ("RuntimeError: Event loop is closed").
- Loading branch information
1 parent
afc3e00
commit 9a0d66d
Showing
1 changed file
with
52 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters