aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbrunner7 <rbrunner@dreamshare.ch>2018-08-12 14:49:32 +0200
committerrbrunner7 <rbrunner@dreamshare.ch>2018-08-13 21:21:24 +0200
commit77655b0a0e46c6bccece889e5d98cc98b98fb5e3 (patch)
tree480e31c558bc644ce4dae6a15c40e5bb0742808b /src
parentMerge pull request #4129 (diff)
downloadmonero-77655b0a0e46c6bccece889e5d98cc98b98fb5e3.tar.xz
simplewallet: Simplify LOCK_IDLE_SCOPE macro
Diffstat (limited to 'src')
-rw-r--r--src/simplewallet/simplewallet.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 775b7c359..0523ce97e 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -95,13 +95,8 @@ typedef cryptonote::simple_wallet sw;
m_auto_refresh_enabled.store(false, std::memory_order_relaxed); \
/* stop any background refresh, and take over */ \
m_wallet->stop(); \
- m_idle_mutex.lock(); \
- while (m_auto_refresh_refreshing) \
- m_idle_cond.notify_one(); \
- m_idle_mutex.unlock(); \
-/* if (auto_refresh_run)*/ \
- /*m_auto_refresh_thread.join();*/ \
boost::unique_lock<boost::mutex> lock(m_idle_mutex); \
+ m_idle_cond.notify_all(); \
epee::misc_utils::auto_scope_leave_caller scope_exit_handler = epee::misc_utils::create_scope_leave_handler([&](){ \
m_auto_refresh_enabled.store(auto_refresh_enabled, std::memory_order_relaxed); \
})