Add RandomAccessAdaptor::Prefetch

This commit is contained in:
yvt 2019-05-19 13:12:16 +09:00
parent 1997fec9a6
commit 40037ecb34

View File

@ -84,6 +84,15 @@ namespace spades {
}
}
/**
* Read the inner stream ahead to make the internal buffer at least `length` bytes long.
*/
void Prefetch(std::size_t length) {
SPADES_MARK_FUNCTION();
ExpandTo(length);
}
private:
/**
* Tries to ensure `buffer` is at least `newBufferSize` bytes long.