[Libreoffice-commits] online.git: net/Socket.hpp wsd/AdminModel.hpp
Jan Holesovsky
kendy at collabora.com
Mon Apr 10 12:55:26 UTC 2017
net/Socket.hpp | 7 +++----
wsd/AdminModel.hpp | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
New commits:
commit e0f7c3fc670c9570dd9856958fcf1f4f97a35fef
Author: Jan Holesovsky <kendy at collabora.com>
Date: Mon Apr 10 14:54:17 2017 +0200
Set the _owner even in the release builds.
We are warning about thread affinity even in the non-debug builds.
Change-Id: Ia91170765e9f4a29939dee847899345e9396d2c3
diff --git a/net/Socket.hpp b/net/Socket.hpp
index 46499414..89844912 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -221,11 +221,11 @@ protected:
{
setNoDelay();
_sendBufferSize = DefaultSendBufferSize;
-#if ENABLE_DEBUG
_owner = std::this_thread::get_id();
LOG_DBG("#" << _fd << " Thread affinity set to 0x" << std::hex <<
_owner << "." << std::dec);
+#if ENABLE_DEBUG
const int oldSize = getSocketBufferSize();
setSocketBufferSize(0);
LOG_TRC("#" << _fd << ": Buffer size: " << getSendBufferSize() <<
@@ -236,7 +236,8 @@ protected:
private:
const int _fd;
int _sendBufferSize;
- // always enabled to avoid ABI change in debug mode ...
+
+ /// We check the owner even in the release builds, needs to be always correct.
std::thread::id _owner;
};
@@ -533,11 +534,9 @@ private:
Util::setThreadName(_name);
LOG_INF("Starting polling thread [" << _name << "].");
-#if ENABLE_DEBUG
_owner = std::this_thread::get_id();
LOG_DBG("Thread affinity of " << _name << " set to 0x" <<
std::hex << _owner << "." << std::dec);
-#endif
// Invoke the virtual implementation.
pollingThread();
diff --git a/wsd/AdminModel.hpp b/wsd/AdminModel.hpp
index 9a7ee8c9..80f0437b 100644
--- a/wsd/AdminModel.hpp
+++ b/wsd/AdminModel.hpp
@@ -208,7 +208,7 @@ private:
std::list<unsigned> _cpuStats;
unsigned _cpuStatsSize = 100;
- // always enabled to avoid ABI change in debug mode ...
+ /// We check the owner even in the release builds, needs to be always correct.
std::thread::id _owner;
};
More information about the Libreoffice-commits
mailing list