diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-08-11 14:56:40 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-08-11 14:56:40 +0200 |
commit | 9273899ee78d2a46205e5f0fcc2942203943f5a5 (patch) | |
tree | f40f8e25b44949d55f8755295d9fdd89d485177a /src/simplewallet/simplewallet.h | |
parent | Merge pull request #947 (diff) | |
parent | simplewallet: make the refresh thread into more generic idle thread (diff) | |
download | monero-9273899ee78d2a46205e5f0fcc2942203943f5a5.tar.xz |
Merge pull request #949
da1007f simplewallet: make the refresh thread into more generic idle thread (moneromooo-monero)
Diffstat (limited to 'src/simplewallet/simplewallet.h')
-rw-r--r-- | src/simplewallet/simplewallet.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index 8e3d5d6e0..6c766a32d 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -80,7 +80,7 @@ namespace cryptonote bool run_console_handler(); - void wallet_refresh_thread(); + void wallet_idle_thread(); bool new_wallet(const std::string &wallet_file, const std::string& password, const crypto::secret_key& recovery_key, bool recover, bool two_random, bool testnet, const std::string &old_language); @@ -256,11 +256,13 @@ namespace cryptonote epee::net_utils::http::http_simple_client m_http_client; refresh_progress_reporter_t m_refresh_progress_reporter; - std::atomic<bool> m_auto_refresh_run; + std::atomic<bool> m_idle_run; + boost::thread m_idle_thread; + boost::mutex m_idle_mutex; + boost::condition_variable m_idle_cond; + + std::atomic<bool> m_auto_refresh_enabled; bool m_auto_refresh_refreshing; - boost::thread m_auto_refresh_thread; - boost::mutex m_auto_refresh_mutex; - boost::condition_variable m_auto_refresh_cond; std::atomic<bool> m_in_manual_refresh; }; } |