Allow to show an async dialog when closing the application.