[monero-project/monero] simplewallet: Simplify LOCK_IDLE_SCOPE macro (#4249)

rbrunner7 commented on this pull request.

> boost::unique_lock lock(m_idle_mutex); \
— 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); \
— })
+ m_idle_cond.notify_one();

Ah, no, wrong, there is a change compared to the status quo: The refresh thread can squeeze in today as well, but it would release the wallet immediately again instead of doing a refresh because of `m_auto_refresh_enabled` set to false.

Добавить комментарий