submit disk jobs from read_piece right away

Without this the jobs get submitted on the next tick which may take a while.
This commit is contained in:
Steven Siloti 2016-12-15 14:11:31 -08:00 committed by Arvid Norberg
parent 30303c17df
commit db65eaaa00
1 changed files with 2 additions and 0 deletions

View File

@ -1028,6 +1028,8 @@ namespace libtorrent
get_handle(), r.piece, rp->piece_data, 0);
return;
}
m_ses.deferred_submit_jobs();
for (int i = 0; i < blocks_in_piece; ++i, r.start += block_size())
{
r.length = (std::min)(piece_size - r.start, block_size());