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:
parent
30303c17df
commit
db65eaaa00
|
@ -1028,6 +1028,8 @@ namespace libtorrent
|
||||||
get_handle(), r.piece, rp->piece_data, 0);
|
get_handle(), r.piece, rp->piece_data, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_ses.deferred_submit_jobs();
|
||||||
for (int i = 0; i < blocks_in_piece; ++i, r.start += block_size())
|
for (int i = 0; i < blocks_in_piece; ++i, r.start += block_size())
|
||||||
{
|
{
|
||||||
r.length = (std::min)(piece_size - r.start, block_size());
|
r.length = (std::min)(piece_size - r.start, block_size());
|
||||||
|
|
Loading…
Reference in New Issue