back-out attempt to make disk cache hits faster. it corrupts data

This commit is contained in:
Arvid Norberg 2011-11-28 17:51:14 +00:00
parent a3f0c04090
commit cc6bc5ba17
1 changed files with 2 additions and 1 deletions

View File

@ -1321,6 +1321,7 @@ namespace libtorrent
&& m_settings.max_queued_disk_bytes > 0)
m_exceeded_write_queue = true;
}
/*
else if (j.action == disk_io_job::read)
{
// if this is a cache hit, return it right away!
@ -1347,7 +1348,7 @@ namespace libtorrent
free_buffer(j.buffer);
const_cast<disk_io_job&>(j).buffer = 0;
}
*/
m_jobs.push_back(j);
m_jobs.back().callback.swap(const_cast<boost::function<void(int, disk_io_job const&)>&>(f));