[Libreoffice-commits] online.git: loolwsd/DocumentBroker.cpp loolwsd/Util.hpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sun Oct 23 21:10:03 UTC 2016
loolwsd/DocumentBroker.cpp | 1 -
loolwsd/Util.hpp | 7 -------
2 files changed, 8 deletions(-)
New commits:
commit 47ed5e40dd743ded1bbe2ec66f4aa1e0885b9e5c
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sat Oct 22 19:02:01 2016 -0400
loolwsd: kill assertIsNotLocked
It was intended to assert that the *same* thread
hadn't locked, not any. As it stands, it's problematic
and was decided to let go.
Change-Id: Iddb76f0edd62b7cdca062c2aa924b08e3d7952ef
Reviewed-on: https://gerrit.libreoffice.org/30205
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index ca10d50..e64dfff 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -525,7 +525,6 @@ size_t DocumentBroker::removeSession(const std::string& id)
void DocumentBroker::alertAllUsersOfDocument(const std::string& cmd, const std::string& kind)
{
- Util::assertIsNotLocked(_mutex);
std::lock_guard<std::mutex> lock(_mutex);
std::stringstream ss;
diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index 21ef610..40f0793 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -106,13 +106,6 @@ namespace Util
assert(!mtx.try_lock());
}
- inline
- void assertIsNotLocked(std::mutex& mtx)
- {
- assert(mtx.try_lock());
- mtx.unlock();
- }
-
/// Safely remove a file or directory.
/// Supresses exception when the file is already removed.
/// This can happen when there is a race (unavoidable) or when
More information about the Libreoffice-commits
mailing list