mirror of
https://github.com/monero-project/monero.git
synced 2025-05-28 19:42:11 -04:00
wallet: cancellable refresh
^C while in manual refresh will cancel the refresh, since that's often an annoying thing to have to wait for. Also, a manual refresh command will interrupt any running background refresh and take over, rather than wait for the background refresh to be done, and look to be hanging.
This commit is contained in:
parent
8289975e22
commit
d68a63e404
5 changed files with 58 additions and 14 deletions
|
@ -680,6 +680,7 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re
|
|||
get_short_chain_history(short_chain_history);
|
||||
pull_blocks(start_height, blocks_start_height, short_chain_history, blocks);
|
||||
|
||||
m_run.store(true, std::memory_order_relaxed);
|
||||
while(m_run.load(std::memory_order_relaxed))
|
||||
{
|
||||
try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue