diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-25 03:08:27 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-25 03:08:27 -0500 |
| commit | 23e917df454ba1588fcbe08adfa47422a443b9da (patch) | |
| tree | 47d47b43735fb518f24dc822e1fbd3e1c18b07db /src/loot.h | |
| parent | 0c69619dbe4fae24794b2539a331ca7ac66f1f93 (diff) | |
switched to overlapped io so lootcli can still be terminated even if it's not writing anything to stdout
Diffstat (limited to 'src/loot.h')
| -rw-r--r-- | src/loot.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -11,6 +11,7 @@ Q_DECLARE_METATYPE(lootcli::Progress); Q_DECLARE_METATYPE(MOBase::log::Levels); class OrganizerCore; +class AsyncPipe; class Loot : public QObject { @@ -98,16 +99,13 @@ private: std::atomic<bool> m_cancel; std::atomic<bool> m_result; env::HandlePtr m_lootProcess; - env::HandlePtr m_stdout; + std::unique_ptr<AsyncPipe> m_pipe; std::string m_outputBuffer; Report m_report; - HANDLE createPipe(); bool spawnLootcli( QWidget* parent, OrganizerCore& core, bool didUpdateMasterList, - HANDLE stdoutHandle); - - std::string readFromPipe(); + env::HandlePtr stdoutHandle); void lootThread(); bool waitForCompletion(); |
