summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2026-10-18 12:25:46 +0200
committerGitHub <noreply@github.com>2026-10-18 12:25:46 +0200
commit8c19346fa956c37264751868a8ac4d674bfff6de (patch)
treecd48986a05abe5c2e2c63bff71762940ec4eb6e0 /Source/Core
parentb869a2ab2035f0ff0c0ca71becb4e33131ebb1b7 (diff)
parent1acbcaceffdf11d5b6d90fe2c864a8683b930908 (diff)
Merge pull request #14621 from jordan-woyak/cached-blob-jthread
DiscIO/CachedBlob: Minor cleanup by replacing std::thread with std::jthread.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DiscIO/CachedBlob.cpp11
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