This commit is contained in:
Sebastian Messmer 2015-04-09 19:09:39 +02:00
parent 8a8b306f3d
commit 698cc41db5

View File

@ -111,6 +111,7 @@ std::unique_ptr<CachedResourceRef> CachingStore<Resource, CachedResourceRef, Key
template<class Resource, class CachedResourceRef, class Key>
std::unique_ptr<CachedResourceRef> CachingStore<Resource, CachedResourceRef, Key>::load(const Key &key) {
//TODO This lock doesn't allow loading different blocks in parallel. Can we do something with futures maybe?
std::lock_guard<std::mutex> lock(_mutex);
auto found = _openResources.find(key);
if (found == _openResources.end()) {