From e143af1d3c07f089ad27645da70e5ab647966a44 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Sat, 18 Feb 2023 10:46:42 +0000 Subject: [PATCH] speed up shutdown --- src/textual/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/textual/app.py b/src/textual/app.py index 57937dba0..c64d59799 100644 --- a/src/textual/app.py +++ b/src/textual/app.py @@ -1828,6 +1828,7 @@ class App(Generic[ReturnType], DOMNode): self._writer_thread.stop() async def _on_exit_app(self) -> None: + self._begin_batch() # Prevent repaint / layout while shutting down await self._message_queue.put(None) def refresh(self, *, repaint: bool = True, layout: bool = False) -> None: