loolwsd/LOOLWSD.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit d8c2bb919526688f20be6d9f9eae96edb2cb3f59 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Mon Nov 7 18:21:28 2016 -0500 loolwsd: minimize holding locks beyond the necessary point Change-Id: I379a649469622682d7ebe98b8a7ebe29eddd1dfa Reviewed-on: https://gerrit.libreoffice.org/30674 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 425b20f..6334a2c 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -347,11 +347,13 @@ static void prespawnChildren() static size_t addNewChild(const std::shared_ptr<ChildProcess>& child) { std::unique_lock<std::mutex> lock(NewChildrenMutex); + --OutstandingForks; NewChildren.emplace_back(child); const auto count = NewChildren.size(); - LOG_INF("Have " << count << " " << (count == 1 ? "child." : "children.")); + lock.unlock(); + LOG_INF("Have " << count << " " << (count == 1 ? "child." : "children.")); NewChildrenCV.notify_one(); return count; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits