mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 03:29:24 +00:00
firehose application shutdown
This commit is contained in:
parent
4b197dd49c
commit
37aa04e3e5
6 changed files with 12 additions and 6 deletions
|
@ -79,6 +79,7 @@ Application::Application(int& argc, char** argv)
|
|||
|
||||
Application::~Application()
|
||||
{
|
||||
qDebug() << "~Application";
|
||||
if (m_lockFile) {
|
||||
m_lockFile->unlock();
|
||||
delete m_lockFile;
|
||||
|
|
|
@ -1207,6 +1207,7 @@ void MainWindow::closeEvent(QCloseEvent *event) {
|
|||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if (!this->cleanedUp) {
|
||||
qDebug() << "MainWindow: cleaning up";
|
||||
this->cleanedUp = true;
|
||||
|
||||
emit aboutToQuit();
|
||||
|
@ -1934,5 +1935,5 @@ int MainWindow::findTab(const QString &title) {
|
|||
}
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
qDebug() << "~MainWindow";
|
||||
qDebug() << "~MainWindow" << QThread::currentThreadId();
|
||||
}
|
|
@ -67,7 +67,7 @@ WindowManager::~WindowManager() {
|
|||
qDebug() << "~WindowManager";
|
||||
m_cleanupThread->quit();
|
||||
m_cleanupThread->wait();
|
||||
qDebug() << "Cleanup thread done";
|
||||
qDebug() << "WindowManager: cleanup thread done" << QThread::currentThreadId();
|
||||
}
|
||||
|
||||
// ######################## APPLICATION LIFECYCLE ########################
|
||||
|
@ -82,7 +82,7 @@ void WindowManager::quitAfterLastWindow() {
|
|||
}
|
||||
|
||||
void WindowManager::close() {
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
qDebug() << Q_FUNC_INFO << QThread::currentThreadId();
|
||||
for (const auto &window: m_windows) {
|
||||
window->close();
|
||||
}
|
||||
|
@ -102,12 +102,14 @@ void WindowManager::close() {
|
|||
|
||||
torManager()->stop();
|
||||
|
||||
deleteLater();
|
||||
|
||||
qDebug() << "Calling QApplication::quit()";
|
||||
QApplication::quit();
|
||||
}
|
||||
|
||||
void WindowManager::closeWindow(MainWindow *window) {
|
||||
qDebug() << "closing Window";
|
||||
qDebug() << "WindowManager: closing Window";
|
||||
m_windows.removeOne(window);
|
||||
|
||||
// Move Wallet to a different thread for cleanup, so it doesn't block GUI thread
|
||||
|
|
|
@ -1431,7 +1431,7 @@ void Wallet::getTxPoolStatsAsync() {
|
|||
|
||||
Wallet::~Wallet()
|
||||
{
|
||||
qDebug("~Wallet: Closing wallet");
|
||||
qDebug() << "~Wallet: Closing wallet" << QThread::currentThreadId();
|
||||
|
||||
pauseRefresh();
|
||||
m_walletImpl->stop();
|
||||
|
@ -1448,5 +1448,5 @@ Wallet::~Wallet()
|
|||
|
||||
delete m_walletImpl;
|
||||
m_walletImpl = nullptr;
|
||||
qDebug("m_walletImpl deleted");
|
||||
qDebug() << "m_walletImpl deleted" << QThread::currentThreadId();
|
||||
}
|
||||
|
|
|
@ -312,6 +312,7 @@ WalletManager::WalletManager(QObject *parent)
|
|||
|
||||
WalletManager::~WalletManager()
|
||||
{
|
||||
qDebug() << "~WalletManager" << QThread::currentThreadId();
|
||||
m_scheduler.shutdownWaitForFinished();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ FutureScheduler::FutureScheduler(QObject *parent)
|
|||
|
||||
FutureScheduler::~FutureScheduler()
|
||||
{
|
||||
qDebug() << "~FutureScheduler:" << QThread::currentThreadId();
|
||||
shutdownWaitForFinished();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue