submit disk jobs in read_piece()

This commit is contained in:
arvidn 2017-07-18 10:03:37 +03:00 committed by Arvid Norberg
parent 3ce15b36d1
commit 33a2abebfe
3 changed files with 4 additions and 1 deletions

View File

@ -176,6 +176,8 @@ namespace libtorrent {
virtual std::vector<open_file_state> get_status(storage_index_t) const = 0;
virtual void submit_jobs() = 0;
#if TORRENT_USE_ASSERTS
virtual bool is_disk_buffer(char* buffer) const = 0;
#endif

View File

@ -348,7 +348,7 @@ namespace aux {
std::vector<open_file_state> get_status(storage_index_t) const override;
// this submits all queued up jobs to the thread
void submit_jobs();
void submit_jobs() override;
block_cache* cache() { return &m_disk_cache; }

View File

@ -861,6 +861,7 @@ namespace libtorrent {
, std::bind(&torrent::on_disk_read_complete
, shared_from_this(), _1, _2, _3, r, rp));
}
m_ses.disk_thread().submit_jobs();
}
void torrent::send_share_mode()