diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-05-07 08:43:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-07 12:50:20 +0200 |
commit | 6e8f63f772ebb9487c75324c23352ef3fea8e38b (patch) | |
tree | 1eb475480b1d64d0ed050c83bd7dfe6cc0fc2982 /unoxml | |
parent | 9313b6c02cc40633edfaadfc7941cbb5640368b2 (diff) |
osl::Mutex->std::mutex in librdf_NamedGraph
Change-Id: If28bef2bd44dc469e6534b166d4c25c0a7c3b2eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133968
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoxml')
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 7b5aaa508f0d..63654e09efdd 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -741,7 +741,7 @@ private: /// Querying is rather slow, so cache the results. std::map<OUString, std::vector<rdf::Statement>> m_aStatementsCache; - ::osl::Mutex m_CacheMutex; + std::mutex m_CacheMutex; }; @@ -783,7 +783,7 @@ void SAL_CALL librdf_NamedGraph::clear() throw lang::WrappedTargetRuntimeException( ex.Message, *this, anyEx ); } - ::osl::MutexGuard g(m_CacheMutex); + std::unique_lock g(m_CacheMutex); m_aStatementsCache.clear(); } @@ -798,7 +798,7 @@ void SAL_CALL librdf_NamedGraph::addStatement( "librdf_NamedGraph::addStatement: repository is gone", *this); } { - ::osl::MutexGuard g(m_CacheMutex); + std::unique_lock g(m_CacheMutex); m_aStatementsCache.clear(); } m_pRep->addStatementGraph_NoLock( @@ -816,7 +816,7 @@ void SAL_CALL librdf_NamedGraph::removeStatements( "librdf_NamedGraph::removeStatements: repository is gone", *this); } { - ::osl::MutexGuard g(m_CacheMutex); + std::unique_lock g(m_CacheMutex); m_aStatementsCache.clear(); } m_pRep->removeStatementsGraph_NoLock( @@ -845,7 +845,7 @@ librdf_NamedGraph::getStatements( { OUString cacheKey = createCacheKey_NoLock(i_xSubject, i_xPredicate, i_xObject); { - ::osl::MutexGuard g(m_CacheMutex); + std::unique_lock g(m_CacheMutex); auto it = m_aStatementsCache.find(cacheKey); if (it != m_aStatementsCache.end()) { return new librdf_GraphResult2(it->second); @@ -861,7 +861,7 @@ librdf_NamedGraph::getStatements( i_xSubject, i_xPredicate, i_xObject, m_xName); { - ::osl::MutexGuard g(m_CacheMutex); + std::unique_lock g(m_CacheMutex); m_aStatementsCache.emplace(cacheKey, vStatements); } return new librdf_GraphResult2(vStatements); |