diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-17 13:23:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-18 09:48:30 +0000 |
commit | aa4d174103f5422168a29b83f596953098e4794c (patch) | |
tree | 786ba4b5e9ab23a8c9b7ca853c9f3801de024747 /dbaccess | |
parent | cb9492ce8a54848b5418a0efdf2beeb7999f3e54 (diff) |
osl::Mutex->std::mutex in dbaui::OAsynchronousLink
Change-Id: Ida29c113db891b260ebc2b6d0d4638cb5224eac6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147231
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/AsynchronousLink.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dbaccess/source/ui/browser/AsynchronousLink.cxx b/dbaccess/source/ui/browser/AsynchronousLink.cxx index e4dcdb2f9eeb..538ea702c4ac 100644 --- a/dbaccess/source/ui/browser/AsynchronousLink.cxx +++ b/dbaccess/source/ui/browser/AsynchronousLink.cxx @@ -31,14 +31,14 @@ OAsynchronousLink::OAsynchronousLink(const Link<void*, void>& _rHandler) OAsynchronousLink::~OAsynchronousLink() { { - ::osl::MutexGuard aEventGuard(m_aEventSafety); + std::unique_lock aEventGuard(m_aEventSafety); if (m_nEventId) Application::RemoveUserEvent(m_nEventId); m_nEventId = nullptr; } { - ::osl::MutexGuard aDestructionGuard(m_aDestructionSafety); + std::unique_lock aDestructionGuard(m_aDestructionSafety); // this is just for the case we're deleted while another thread just handled the event : // if this other thread called our link while we were deleting the event here, the // link handler blocked. With leaving the above block it continued, but now we are prevented @@ -48,7 +48,7 @@ OAsynchronousLink::~OAsynchronousLink() void OAsynchronousLink::Call(void* _pArgument) { - ::osl::MutexGuard aEventGuard(m_aEventSafety); + std::unique_lock aEventGuard(m_aEventSafety); if (m_nEventId) Application::RemoveUserEvent(m_nEventId); m_nEventId = Application::PostUserEvent(LINK(this, OAsynchronousLink, OnAsyncCall), _pArgument); @@ -56,7 +56,7 @@ void OAsynchronousLink::Call(void* _pArgument) void OAsynchronousLink::CancelCall() { - ::osl::MutexGuard aEventGuard(m_aEventSafety); + std::unique_lock aEventGuard(m_aEventSafety); if (m_nEventId) Application::RemoveUserEvent(m_nEventId); m_nEventId = nullptr; @@ -65,9 +65,9 @@ void OAsynchronousLink::CancelCall() IMPL_LINK(OAsynchronousLink, OnAsyncCall, void*, _pArg, void) { { - ::osl::MutexGuard aDestructionGuard(m_aDestructionSafety); + std::unique_lock aDestructionGuard(m_aDestructionSafety); { - ::osl::MutexGuard aEventGuard(m_aEventSafety); + std::unique_lock aEventGuard(m_aEventSafety); if (!m_nEventId) // our destructor deleted the event just while we are waiting for m_aEventSafety // -> get outta here |