summaryrefslogtreecommitdiff
path: root/src/lockwidget.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-11-06 06:50:05 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2019-11-06 07:45:03 -0500
commit8f40ec0bdcb99cc1a0a2bde3074842391844f5d6 (patch)
treecb27da55c4860a4140174d52a8f982e2da5037de /src/lockwidget.h
parent96cc662b187f465713d3963f7c8cf9a1b4856aa5 (diff)
threaded wait for process
Diffstat (limited to 'src/lockwidget.h')
-rw-r--r--src/lockwidget.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lockwidget.h b/src/lockwidget.h
index 8062c478..640d0076 100644
--- a/src/lockwidget.h
+++ b/src/lockwidget.h
@@ -1,6 +1,7 @@
#pragma once
#include <QMainWindow>
+#include <mutex>
class LockInterface;
@@ -47,6 +48,7 @@ public:
public:
~Session();
+ void unlock();
void setInfo(DWORD pid, const QString& name);
Results result() const;
@@ -54,6 +56,7 @@ public:
const QString& name() const;
private:
+ mutable std::mutex m_mutex;
DWORD m_pid;
QString m_name;
};
@@ -76,7 +79,7 @@ private:
QWidget* m_parent;
std::unique_ptr<LockInterface> m_ui;
std::vector<std::weak_ptr<Session>> m_sessions;
- Results m_result;
+ std::atomic<Results> m_result;
std::vector<QPointer<QWidget>> m_disabled;
void createUi(Reasons reason);