diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2026-10-09 14:52:08 -0500 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2026-10-09 14:52:24 -0500 |
| commit | 1acbcaceffdf11d5b6d90fe2c864a8683b930908 (patch) | |
| tree | 902f48ff0a21b1917b52ef4ef73e0f1f0273e743 /Source/Core/DiscIO | |
| parent | 0f56e58742a64a993e4f2f7b34cbafccb613ebcd (diff) | |
DiscIO/CachedBlob: Minor cleanup by replacing std::thread with std::jthread.
Diffstat (limited to 'Source/Core/DiscIO')
| -rw-r--r-- | Source/Core/DiscIO/CachedBlob.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/Core/DiscIO/CachedBlob.cpp b/Source/Core/DiscIO/CachedBlob.cpp index f1bbf055ee..f59e09a095 100644 --- a/Source/Core/DiscIO/CachedBlob.cpp +++ b/Source/Core/DiscIO/CachedBlob.cpp @@ -24,12 +24,6 @@ public: { } - ~CacheFiller() - { - m_stop_thread.store(true, std::memory_order_relaxed); - m_thread.join(); - } - bool Read(u64 offset, u64 size, u8* out_ptr) { if (size == 0) @@ -126,7 +120,7 @@ private: while (true) { - if (m_stop_thread.load(std::memory_order_relaxed)) + if (m_thread.get_stop_token().stop_requested()) { INFO_LOG_FMT(DISCIO, "CachedBlobReader: Stopped"); break; @@ -178,8 +172,7 @@ private: DiscScrubber m_scrubber; - std::atomic_bool m_stop_thread{}; - std::thread m_thread; + std::jthread m_thread; }; class CachedBlobReader final : public BlobReader |
