qt: implement FutureScheduler, always await async code to complete

This commit is contained in:
xiphon
2019-06-20 20:28:59 +00:00
parent c7956f76ea
commit be7810c5a8
9 changed files with 277 additions and 187 deletions

View File

@@ -33,6 +33,7 @@
#include <QUrl>
#include <QProcess>
#include <QVariantMap>
#include "qt/FutureScheduler.h"
#include "NetworkType.h"
class DaemonManager : public QObject
@@ -71,6 +72,8 @@ public slots:
private:
explicit DaemonManager(QObject *parent = 0);
~DaemonManager();
static DaemonManager * m_instance;
static QStringList m_clArgs;
QProcess *m_daemon;
@@ -79,6 +82,7 @@ private:
bool m_has_daemon = true;
bool m_app_exit = false;
FutureScheduler m_scheduler;
};
#endif // DAEMONMANAGER_H