Merge pull request from SamGondelman/deadlock

Case 19735: Fix ResourceCache mutex issues
This commit is contained in:
Sam Gateau 2018-11-07 09:55:41 -08:00 committed by GitHub
commit 5d0be31fe7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions
libraries/networking/src

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: