[Libreoffice-commits] online.git: wsd/SenderQueue.hpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 15 21:37:45 UTC 2018
wsd/SenderQueue.hpp | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
New commits:
commit 1ce8c940228fa55738ff6e761018f18be3e23c7b
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Oct 15 17:37:21 2018 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Oct 16 00:22:35 2018 +0300
Don't hide check for TerminationFlag behind a pointless local abstraction layer
It is useful to find all uses of TerminationFlag directly with git
grep without having to look through abstractions.
Change-Id: I8bc999bd36d06c805c2a6331dba739b41239ddec
diff --git a/wsd/SenderQueue.hpp b/wsd/SenderQueue.hpp
index fc3464b3f..251be7df3 100644
--- a/wsd/SenderQueue.hpp
+++ b/wsd/SenderQueue.hpp
@@ -36,13 +36,11 @@ public:
{
}
- bool stopping() const { return TerminationFlag; }
-
size_t enqueue(const Item& item)
{
std::unique_lock<std::mutex> lock(_mutex);
- if (!stopping() && deduplicate(item))
+ if (!TerminationFlag && deduplicate(item))
_queue.push_back(item);
return _queue.size();
@@ -53,7 +51,7 @@ public:
{
std::unique_lock<std::mutex> lock(_mutex);
- if (!_queue.empty() && !stopping())
+ if (!_queue.empty() && !TerminationFlag)
{
item = _queue.front();
_queue.pop_front();
@@ -61,8 +59,8 @@ public:
}
else
{
- if (stopping())
- LOG_DBG("SenderQueue: stopping");
+ if (TerminationFlag)
+ LOG_DBG("SenderQueue: TerminationFlag is set");
return false;
}
}
More information about the Libreoffice-commits
mailing list