added disk cache for write operations

This commit is contained in:
Arvid Norberg
2008-02-08 10:22:05 +00:00
parent 196f9c3544
commit 8cf0510144
18 changed files with 645 additions and 166 deletions

View File

@@ -85,7 +85,8 @@ void run_storage_tests(boost::intrusive_ptr<torrent_info> info
// make sure the piece_manager can identify the pieces
{
file_pool fp;
disk_io_thread io;
asio::io_service ios;
disk_io_thread io(ios);
boost::shared_ptr<int> dummy(new int);
boost::intrusive_ptr<piece_manager> pm = new piece_manager(dummy, info
, test_path, fp, io, default_storage_constructor);
@@ -130,6 +131,8 @@ void run_storage_tests(boost::intrusive_ptr<torrent_info> info
pm->async_read(r, bind(&on_read_piece, _1, _2, piece2, piece_size));
pm->async_release_files(none);
ios.run();
io.join();
}
}