TODOs
This commit is contained in:
parent
8a8b306f3d
commit
698cc41db5
@ -111,6 +111,7 @@ std::unique_ptr<CachedResourceRef> CachingStore<Resource, CachedResourceRef, Key
|
|||||||
|
|
||||||
template<class Resource, class CachedResourceRef, class Key>
|
template<class Resource, class CachedResourceRef, class Key>
|
||||||
std::unique_ptr<CachedResourceRef> CachingStore<Resource, CachedResourceRef, Key>::load(const Key &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);
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
auto found = _openResources.find(key);
|
auto found = _openResources.find(key);
|
||||||
if (found == _openResources.end()) {
|
if (found == _openResources.end()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user