refactor
This commit is contained in:
parent
d2928e5580
commit
f260f1d50a
@ -558,10 +558,12 @@ void open_file::update_background_reader(std::size_t read_chunk) {
|
|||||||
}
|
}
|
||||||
io_thread_notify_.notify_all();
|
io_thread_notify_.notify_all();
|
||||||
io_lock.unlock();
|
io_lock.unlock();
|
||||||
} else {
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
next_chunk = read_chunk_ =
|
next_chunk = read_chunk_ = ((read_chunk_ + 1U) >= read_state_.size())
|
||||||
((read_chunk_ + 1U) >= read_state_.size()) ? 0U
|
? 0U
|
||||||
: read_chunk_ + 1U;
|
: read_chunk_ + 1U;
|
||||||
} while ((next_chunk != 0U) && (active_downloads_.find(next_chunk) !=
|
} while ((next_chunk != 0U) && (active_downloads_.find(next_chunk) !=
|
||||||
active_downloads_.end()));
|
active_downloads_.end()));
|
||||||
@ -569,7 +571,6 @@ void open_file::update_background_reader(std::size_t read_chunk) {
|
|||||||
file_lock.unlock();
|
file_lock.unlock();
|
||||||
download_chunk(next_chunk, true, false);
|
download_chunk(next_chunk, true, false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user