net/Socket.hpp | 4 ++++ 1 file changed, 4 insertions(+) New commits: commit d345c29a477bf7edd98b7b884aaacc4c06b82869 Author: Jan Holesovsky <ke...@collabora.com> Date: Wed Apr 5 11:35:59 2017 +0200
The other isCorrectThread() should be active only in the debug build too. Change-Id: Ieadb7e14f70752f5cfb2fd9ee569b56fb39d528b diff --git a/net/Socket.hpp b/net/Socket.hpp index 4fa51dce..a96c5c60 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -295,6 +295,7 @@ public: /// Are we running in either shutdown, or the polling thread. bool isCorrectThread() const { +#if ENABLE_DEBUG // 0 owner means detached and can be invoked by any thread. if (_owner != std::thread::id(0) && std::this_thread::get_id() != _owner) LOG_WRN("Incorrect thread affinity for " << _name << ". Expected: 0x" << std::hex << @@ -302,6 +303,9 @@ public: std::hex << std::this_thread::get_id() << std::dec << ", stop: " << _stop); return _stop || _owner == std::thread::id(0) || std::this_thread::get_id() == _owner; +#else + return true; +#endif } /// Poll the sockets for available data to read or buffer to write. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits