net/Socket.cpp |   26 ++++++++++++++++++++++++++
 net/Socket.hpp |   26 +-------------------------
 2 files changed, 27 insertions(+), 25 deletions(-)

New commits:
commit 4841ee4f47c3d7d376105830bab6cb1b4108b387
Author:     Tor Lillqvist <[email protected]>
AuthorDate: Thu Sep 13 09:31:52 2018 +0300
Commit:     Tor Lillqvist <[email protected]>
CommitDate: Thu Sep 13 09:33:40 2018 +0300

    Move SocketPoll::pollingThreadEntry() implementation to cpp file
    
    Makes it easier to put a breakpoint in it in Xcode...
    
    Not sure if we have any consistent convention around here anyway about
    which member functions should be defined inline in the class
    definition in the hpp file, and which ones should be in the cpp file.

diff --git a/net/Socket.cpp b/net/Socket.cpp
index 74a0dff16..5c133b33a 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -153,6 +153,32 @@ void SocketPoll::feed(const std::string& payload)
 
 #endif
 
+void SocketPoll::pollingThreadEntry()
+{
+    try
+    {
+        Util::setThreadName(_name);
+        LOG_INF("Starting polling thread [" << _name << "].");
+
+        _owner = std::this_thread::get_id();
+        LOG_DBG("Thread affinity of " << _name << " set to " <<
+                Log::to_string(_owner) << ".");
+
+        // Invoke the virtual implementation.
+        pollingThread();
+
+        // Release sockets.
+        _pollSockets.clear();
+        _newSockets.clear();
+    }
+    catch (const std::exception& exc)
+    {
+        LOG_ERR("Exception in polling thread [" << _name << "]: " << 
exc.what());
+    }
+
+    _threadFinished = true;
+}
+
 void SocketPoll::wakeupWorld()
 {
 #ifndef MOBILEAPP
diff --git a/net/Socket.hpp b/net/Socket.hpp
index 074734ca9..3e86055e0 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -675,31 +675,7 @@ private:
 
     /// The polling thread entry.
     /// Used to set the thread name and mark the thread as stopped when done.
-    void pollingThreadEntry()
-    {
-        try
-        {
-            Util::setThreadName(_name);
-            LOG_INF("Starting polling thread [" << _name << "].");
-
-            _owner = std::this_thread::get_id();
-            LOG_DBG("Thread affinity of " << _name << " set to " <<
-                    Log::to_string(_owner) << ".");
-
-            // Invoke the virtual implementation.
-            pollingThread();
-
-            // Release sockets.
-            _pollSockets.clear();
-            _newSockets.clear();
-        }
-        catch (const std::exception& exc)
-        {
-            LOG_ERR("Exception in polling thread [" << _name << "]: " << 
exc.what());
-        }
-
-        _threadFinished = true;
-    }
+    void pollingThreadEntry();
 
 private:
     /// Debug name used for logging.
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to