diff options
| author | Mai M <mathew1800@gmail.com> | 2021-08-27 10:15:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-27 10:15:25 -0400 |
| commit | 48161953662b9d77c4ece357f6f16814dd0c5f58 (patch) | |
| tree | 5f10b66d89f69cda73eb5e8f1b254d7165ed6774 /Source/Core/UICommon/GameFileCache.cpp | |
| parent | 7d88354659148479818423d0990b055c4e845cc3 (diff) | |
| parent | 719930bb390ed0020b99a7942289d83218e99d69 (diff) | |
Merge pull request #10054 from JosJuice/android-game-cache-lock
Android: Reduce gameFileCache lock contention
Diffstat (limited to 'Source/Core/UICommon/GameFileCache.cpp')
| -rw-r--r-- | Source/Core/UICommon/GameFileCache.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/UICommon/GameFileCache.cpp b/Source/Core/UICommon/GameFileCache.cpp index a0bf0caf42..30bbca924b 100644 --- a/Source/Core/UICommon/GameFileCache.cpp +++ b/Source/Core/UICommon/GameFileCache.cpp @@ -4,6 +4,7 @@ #include "UICommon/GameFileCache.h" #include <algorithm> +#include <atomic> #include <cstddef> #include <functional> #include <list> @@ -202,7 +203,7 @@ bool GameFileCache::UpdateAdditionalMetadata(std::shared_ptr<GameFile>* game_fil if (custom_cover_changed) copy->CustomCoverCommit(); - *game_file = std::move(copy); + std::atomic_store(game_file, std::move(copy)); return true; } |
