From 1f553f46fb4f3c5eec631352cdd900a0709016af Mon Sep 17 00:00:00 2001 From: nga <nga@yandex-team.ru> Date: Thu, 10 Feb 2022 16:48:09 +0300 Subject: Restoring authorship annotation for <nga@yandex-team.ru>. Commit 1 of 2. --- library/cpp/messagebus/session_job_count.cpp | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'library/cpp/messagebus/session_job_count.cpp') diff --git a/library/cpp/messagebus/session_job_count.cpp b/library/cpp/messagebus/session_job_count.cpp index 33322b1910..768a3f5803 100644 --- a/library/cpp/messagebus/session_job_count.cpp +++ b/library/cpp/messagebus/session_job_count.cpp @@ -1,22 +1,22 @@ #include "session_job_count.h" -#include <util/system/yassert.h> - -using namespace NBus; -using namespace NBus::NPrivate; - -TBusSessionJobCount::TBusSessionJobCount() - : JobCount(0) +#include <util/system/yassert.h> + +using namespace NBus; +using namespace NBus::NPrivate; + +TBusSessionJobCount::TBusSessionJobCount() + : JobCount(0) { } - -TBusSessionJobCount::~TBusSessionJobCount() { + +TBusSessionJobCount::~TBusSessionJobCount() { Y_VERIFY(JobCount == 0, "must be 0 job count to destroy job"); -} - -void TBusSessionJobCount::WaitForZero() { - TGuard<TMutex> guard(Mutex); - while (AtomicGet(JobCount) > 0) { - CondVar.WaitI(Mutex); - } -} +} + +void TBusSessionJobCount::WaitForZero() { + TGuard<TMutex> guard(Mutex); + while (AtomicGet(JobCount) > 0) { + CondVar.WaitI(Mutex); + } +} -- cgit v1.2.3