From 29769938f1e7beaf19f7b37204232a3e992212a0 Mon Sep 17 00:00:00 2001 From: Maksim Andrianov Date: Wed, 7 Aug 2019 12:20:34 +0300 Subject: [PATCH] Review fixes --- base/thread_pool_computational.hpp | 4 ++-- base/thread_utils.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/thread_pool_computational.hpp b/base/thread_pool_computational.hpp index 56392fe062..5d0c665492 100644 --- a/base/thread_pool_computational.hpp +++ b/base/thread_pool_computational.hpp @@ -115,14 +115,14 @@ public: m_condition.notify_all(); } - void WaitAndStop() + void WaitingStop() { { std::unique_lock lock(m_mutex); m_done = true; } m_condition.notify_all(); - m_joiner.TryJoin(); + m_joiner.Join(); } private: diff --git a/base/thread_utils.hpp b/base/thread_utils.hpp index d0680de47d..b0857b246a 100644 --- a/base/thread_utils.hpp +++ b/base/thread_utils.hpp @@ -15,7 +15,7 @@ class ThreadsJoiner public: explicit ThreadsJoiner(ThreadContainer & threads) : m_threads(threads) {} - void TryJoin() + void Join() { for (auto & thread : m_threads) { @@ -26,7 +26,7 @@ public: ~ThreadsJoiner() { - TryJoin(); + Join(); } private: