openMSX
PreCacheFile.hh
Go to the documentation of this file.
1 #ifndef PRECACHEFILE_HH
2 #define PRECACHEFILE_HH
3 
4 #include <atomic>
5 #include <string>
6 #include <thread>
7 
8 namespace openmsx {
9 
15 class PreCacheFile final
16 {
17 public:
18  explicit PreCacheFile(std::string name);
19  ~PreCacheFile();
20 
21 private:
22  void run();
23 
24  const std::string name;
25  std::thread thread;
26  std::atomic<bool> exitLoop;
27 };
28 
29 } // namespace openmsx
30 
31 #endif
Read the complete file once and discard result.
Definition: PreCacheFile.hh:15
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
PreCacheFile(std::string name)
Definition: PreCacheFile.cc:9