resource mutex issues

(cherry picked from commit 750629a6194ec98534746a377b3ba027c1dcc20e)
(cherry picked from commit fc5ab3289a5f88f245c2825edd085532bd4c97ca)
This commit is contained in:
SamGondelman 2018-11-06 09:57:51 -08:00
parent d0181283dd
commit 1444b3a186
2 changed files with 3 additions and 1 deletions

View file

@ -740,6 +740,8 @@ void Resource::handleReplyFinished() {
setSize(_bytesTotal);
// Make sure we keep the Resource alive here
auto self = _self.lock();
ResourceCache::requestCompleted(_self);
auto result = _request->getResult();

View file

@ -62,7 +62,7 @@ static const qint64 MAX_UNUSED_MAX_SIZE = MAXIMUM_CACHE_SIZE;
class ResourceCacheSharedItems : public Dependency {
SINGLETON_DEPENDENCY
using Mutex = std::mutex;
using Mutex = std::recursive_mutex;
using Lock = std::unique_lock<Mutex>;
public: