summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
Diffstat (limited to 'io')
-rw-r--r--io/source/connector/connector.hxx5
-rw-r--r--io/source/connector/ctr_socket.cxx6
2 files changed, 6 insertions, 5 deletions
diff --git a/io/source/connector/connector.hxx b/io/source/connector/connector.hxx
index a9321932798e..691fc7a885df 100644
--- a/io/source/connector/connector.hxx
+++ b/io/source/connector/connector.hxx
@@ -27,6 +27,7 @@
#include <unordered_set>
#include <osl/socket.hxx>
#include <osl/pipe.hxx>
+#include <mutex>
namespace stoc_connector
{
@@ -80,12 +81,12 @@ namespace stoc_connector
oslInterlockedCount m_nStatus;
OUString m_sDescription;
- ::osl::Mutex _mutex;
+ std::mutex _mutex;
bool _started;
bool _closed;
bool _error;
- XStreamListener_hash_set _listeners;
+ XStreamListener_hash_set _listeners;
};
}
diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx
index 98b4131be407..a171dc9e7d3b 100644
--- a/io/source/connector/ctr_socket.cxx
+++ b/io/source/connector/ctr_socket.cxx
@@ -35,7 +35,7 @@ namespace stoc_connector {
XStreamListener_hash_set listeners;
{
- ::osl::MutexGuard guard(pCon->_mutex);
+ std::unique_lock guard(pCon->_mutex);
if(!*notified)
{
*notified = true;
@@ -210,14 +210,14 @@ namespace stoc_connector {
// 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);
}