The lean application framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser.
There is a deadlock issue on App._dom_lock, where _close_all holds the lock and waits for the task associated with a message pump, but that task may be executing a "called-next" _prune_nodes call driven by an AwaitRemove which was triggered, for example, by the Footer.recompose call from handling the bindings_updated signal. This deadlock leads to a TimeoutError on app close.
We fix this by omitting the call to _prune_nodes in the AwaitRemove task if the whole application is already closing; it does not make sense to remove individual nodes in this case anyway.
Fixes #4677
Please review the following checklist.
[x] Docstrings on all new or modified functions / classes
There is a deadlock issue on
App._dom_lock
, where_close_all
holds the lock and waits for the task associated with a message pump, but that task may be executing a "called-next"_prune_nodes
call driven by anAwaitRemove
which was triggered, for example, by theFooter.recompose
call from handling thebindings_updated
signal. This deadlock leads to aTimeoutError
on app close.We fix this by omitting the call to
_prune_nodes
in theAwaitRemove
task if the whole application is already closing; it does not make sense to remove individual nodes in this case anyway.Fixes #4677
Please review the following checklist.