Implement RomFS cache and async reads. (#7089)

* Implement RomFS cache and async reads.

* Suggestions and fix compilation.

* Apply suggestions
This commit is contained in:
PabloMK7
2023-11-03 01:19:00 +01:00
committed by GitHub
parent 79ea06b226
commit 4284893044
10 changed files with 404 additions and 22 deletions

View File

@ -86,6 +86,20 @@ public:
*/
virtual void Flush() const = 0;
/**
* Whether the backend supports cached reads.
*/
virtual bool AllowsCachedReads() const {
return false;
}
/**
* Whether the cache is ready for a specified offset and length.
*/
virtual bool CacheReady(std::size_t file_offset, std::size_t length) {
return false;
}
protected:
std::unique_ptr<DelayGenerator> delay_generator;