aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/condvar.cpp
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:25 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:25 +0300
commit344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/condvar.cpp
parent706b83ed7de5a473436620367af31fc0ceecde07 (diff)
downloadydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'util/system/condvar.cpp')
-rw-r--r--util/system/condvar.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/util/system/condvar.cpp b/util/system/condvar.cpp
index 707db52c0b..62f3d22356 100644
--- a/util/system/condvar.cpp
+++ b/util/system/condvar.cpp
@@ -27,11 +27,11 @@ namespace {
using TWaitEvents = TIntrusiveList<TWaitEvent>;
public:
- inline ~TCondVarImpl() {
+ inline ~TCondVarImpl() {
Y_ASSERT(Events_.Empty());
}
- inline void Signal() noexcept {
+ inline void Signal() noexcept {
with_lock (Lock_) {
if (!Events_.Empty()) {
Events_.PopFront()->Signal();
@@ -39,7 +39,7 @@ namespace {
}
}
- inline void BroadCast() noexcept {
+ inline void BroadCast() noexcept {
with_lock (Lock_) {
//TODO
while (!Events_.Empty()) {
@@ -48,7 +48,7 @@ namespace {
}
}
- inline bool WaitD(TMutex& m, TInstant deadLine) noexcept {
+ inline bool WaitD(TMutex& m, TInstant deadLine) noexcept {
TWaitEvent event;
with_lock (Lock_) {
@@ -86,17 +86,17 @@ public:
}
}
- inline ~TImpl() {
+ inline ~TImpl() {
int ret = pthread_cond_destroy(&Cond_);
Y_VERIFY(ret == 0, "pthread_cond_destroy failed: %s", LastSystemErrorText(ret));
}
- inline void Signal() noexcept {
+ inline void Signal() noexcept {
int ret = pthread_cond_signal(&Cond_);
Y_VERIFY(ret == 0, "pthread_cond_signal failed: %s", LastSystemErrorText(ret));
}
- inline bool WaitD(TMutex& lock, TInstant deadLine) noexcept {
+ inline bool WaitD(TMutex& lock, TInstant deadLine) noexcept {
if (deadLine == TInstant::Max()) {
int ret = pthread_cond_wait(&Cond_, (pthread_mutex_t*)lock.Handle());
Y_VERIFY(ret == 0, "pthread_cond_wait failed: %s", LastSystemErrorText(ret));
@@ -117,7 +117,7 @@ public:
}
}
- inline void BroadCast() noexcept {
+ inline void BroadCast() noexcept {
int ret = pthread_cond_broadcast(&Cond_);
Y_VERIFY(ret == 0, "pthread_cond_broadcast failed: %s", LastSystemErrorText(ret));
}
@@ -134,14 +134,14 @@ TCondVar::TCondVar()
TCondVar::~TCondVar() = default;
-void TCondVar::BroadCast() noexcept {
+void TCondVar::BroadCast() noexcept {
Impl_->BroadCast();
}
-void TCondVar::Signal() noexcept {
+void TCondVar::Signal() noexcept {
Impl_->Signal();
}
-bool TCondVar::WaitD(TMutex& mutex, TInstant deadLine) noexcept {
+bool TCondVar::WaitD(TMutex& mutex, TInstant deadLine) noexcept {
return Impl_->WaitD(mutex, deadLine);
}