Fix deadlock between content storage and asset that is being updated during load

#2621
This commit is contained in:
Wojtek Figat
2024-05-20 14:22:03 +02:00
parent 2418167182
commit cfc9f73744
4 changed files with 10 additions and 7 deletions

View File

@@ -252,6 +252,7 @@ void ContentStorageSystem::Job(int32 index)
{
PROFILE_CPU_NAMED("ContentStorage.Job");
const double time = Platform::GetTimeSeconds();
ScopeLock lock(Locker);
for (auto i = StorageMap.Begin(); i.IsNotEnd(); ++i)
{
@@ -271,7 +272,7 @@ void ContentStorageSystem::Job(int32 index)
}
else
{
storage->Tick();
storage->Tick(time);
}
}
}