mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
move unregister
This commit is contained in:
@@ -216,10 +216,8 @@ class MessagePump:
|
||||
"""Close message queue, and optionally wait for queue to finish processing."""
|
||||
if self._closed or self._closing:
|
||||
return
|
||||
print(self, "close_messages")
|
||||
self._closing = True
|
||||
await self._message_queue.put(MessagePriority(None))
|
||||
self.app._unregister(self)
|
||||
cancel_tasks = list(self._child_tasks)
|
||||
for task in cancel_tasks:
|
||||
task.cancel()
|
||||
|
||||
Reference in New Issue
Block a user