osl::Mutex->std::mutex in SocketConnection
Change-Id: Ia63c9cfaf189b328c6fa492bd132f6c9767f573e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127121 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
86aa6ad680
commit
858c4cd07f
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#include <osl/mutex.hxx>
|
||||
#include <mutex>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <rtl/ref.hxx>
|
||||
#include <com/sun/star/connection/XConnection.hpp>
|
||||
@@ -70,7 +70,7 @@ namespace io_acceptor {
|
||||
oslInterlockedCount m_nStatus;
|
||||
OUString m_sDescription;
|
||||
|
||||
::osl::Mutex _mutex;
|
||||
std::mutex _mutex;
|
||||
bool _started;
|
||||
bool _closed;
|
||||
bool _error;
|
||||
@@ -85,7 +85,7 @@ namespace io_acceptor {
|
||||
XStreamListener_hash_set listeners;
|
||||
|
||||
{
|
||||
::osl::MutexGuard guard(pCon->_mutex);
|
||||
std::unique_lock guard(pCon->_mutex);
|
||||
if(!*notified)
|
||||
{
|
||||
*notified = true;
|
||||
@@ -253,14 +253,14 @@ namespace io_acceptor {
|
||||
// XConnectionBroadcaster
|
||||
void SAL_CALL SocketConnection::addStreamListener(const Reference<XStreamListener> & aListener)
|
||||
{
|
||||
MutexGuard guard(_mutex);
|
||||
std::unique_lock guard(_mutex);
|
||||
|
||||
_listeners.insert(aListener);
|
||||
}
|
||||
|
||||
void SAL_CALL SocketConnection::removeStreamListener(const Reference<XStreamListener> & aListener)
|
||||
{
|
||||
MutexGuard guard(_mutex);
|
||||
std::unique_lock guard(_mutex);
|
||||
|
||||
_listeners.erase(aListener);
|
||||
}
|
||||
|
Reference in New Issue
Block a user