fix: 为Resource loader 添加重入锁

This commit is contained in:
MistEO
2023-05-16 00:54:35 +08:00
parent 51cf45b31e
commit cedc07962f

View File

@@ -78,6 +78,9 @@ bool asst::ResourceLoader::load(const std::filesystem::path& path)
return false;
}
static std::mutex load_mutex;
std::unique_lock<std::mutex> lock(load_mutex);
#define LoadResourceAndCheckRet(Config, Filename) \
{ \
auto full_path = path / Filename; \