We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab51874 commit c2c6af8Copy full SHA for c2c6af8
prompt_toolkit/application/application.py
@@ -431,6 +431,12 @@ def invalidate(self) -> None:
431
"""
432
Thread safe way of sending a repaint trigger to the input event loop.
433
434
+ if not self._is_running:
435
+ # Don't schedule a redraw if we're not running.
436
+ # Otherwise, `get_event_loop()` in `call_soon_threadsafe` can fail.
437
+ # See: https://github.com/dbcli/mycli/issues/797
438
+ return
439
+
440
# Never schedule a second redraw, when a previous one has not yet been
441
# executed. (This should protect against other threads calling
442
# 'invalidate' many times, resulting in 100% CPU.)
0 commit comments