aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-07 13:06:40 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-07 16:08:50 +0100
commitda1007f7cd71efd55758be68dbb6f293a8cabb3b (patch)
tree85eaa73e07ce5b9b4b5e3e8383fa98405de94ffa /src/simplewallet/simplewallet.h
parentMerge pull request #937 (diff)
downloadmonero-da1007f7cd71efd55758be68dbb6f293a8cabb3b.tar.xz
simplewallet: make the refresh thread into more generic idle thread
Diffstat (limited to '')
-rw-r--r--src/simplewallet/simplewallet.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h
index b35ca0866..038dd2b35 100644
--- a/src/simplewallet/simplewallet.h
+++ b/src/simplewallet/simplewallet.h
@@ -79,7 +79,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);
@@ -255,11 +255,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;
};
}