loolwsd/LOOLKit.cpp |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 1bc8343c87985f3f52de8d090393660087085295
Author: Henry Castro <[email protected]>
Date:   Sun Aug 2 16:57:32 2015 -0400

    loolwsd: set thread name to queue handler

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index ab2b812..953b6a3 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -1,3 +1,4 @@
+#include <sys/prctl.h>
 
 #include <memory>
 #include <iostream>
@@ -48,6 +49,11 @@ public:
 
     void run() override
     {
+#ifdef __linux
+      if (prctl(PR_SET_NAME, reinterpret_cast<unsigned long>("queue_handler"), 
0, 0, 0) != 0) {
+        std::cout << Util::logPrefix() << "Cannot set thread name :" << 
strerror(errno) << std::endl;
+      }
+#endif
         while (true)
         {
             std::string input = _queue.get();
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to