forked from premiere/premiere-libtorrent
submit disk jobs in read_piece()
This commit is contained in:
parent
3ce15b36d1
commit
33a2abebfe
|
@ -176,6 +176,8 @@ namespace libtorrent {
|
||||||
|
|
||||||
virtual std::vector<open_file_state> get_status(storage_index_t) const = 0;
|
virtual std::vector<open_file_state> get_status(storage_index_t) const = 0;
|
||||||
|
|
||||||
|
virtual void submit_jobs() = 0;
|
||||||
|
|
||||||
#if TORRENT_USE_ASSERTS
|
#if TORRENT_USE_ASSERTS
|
||||||
virtual bool is_disk_buffer(char* buffer) const = 0;
|
virtual bool is_disk_buffer(char* buffer) const = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -348,7 +348,7 @@ namespace aux {
|
||||||
std::vector<open_file_state> get_status(storage_index_t) const override;
|
std::vector<open_file_state> get_status(storage_index_t) const override;
|
||||||
|
|
||||||
// this submits all queued up jobs to the thread
|
// this submits all queued up jobs to the thread
|
||||||
void submit_jobs();
|
void submit_jobs() override;
|
||||||
|
|
||||||
block_cache* cache() { return &m_disk_cache; }
|
block_cache* cache() { return &m_disk_cache; }
|
||||||
|
|
||||||
|
|
|
@ -861,6 +861,7 @@ namespace libtorrent {
|
||||||
, std::bind(&torrent::on_disk_read_complete
|
, std::bind(&torrent::on_disk_read_complete
|
||||||
, shared_from_this(), _1, _2, _3, r, rp));
|
, shared_from_this(), _1, _2, _3, r, rp));
|
||||||
}
|
}
|
||||||
|
m_ses.disk_thread().submit_jobs();
|
||||||
}
|
}
|
||||||
|
|
||||||
void torrent::send_share_mode()
|
void torrent::send_share_mode()
|
||||||
|
|
Loading…
Reference in New Issue