feat/update_config #10

Merged
tqcq merged 26 commits from feat/update_config into master 2024-10-14 10:15:01 +08:00
3 changed files with 3 additions and 4 deletions
Showing only changes of commit 791125454a - Show all commits

View File

@ -113,6 +113,7 @@ private:
} }
private: private:
friend class ScopedLock;
CondVarProxy proxy_; CondVarProxy proxy_;
}; };
}// namespace cond_var }// namespace cond_var

View File

@ -3,7 +3,6 @@
#pragma once #pragma once
#include "tile/base/thread/cond_var.h"
#include "tile/base/thread/mutex.h" #include "tile/base/thread/mutex.h"
#include "tile/base/thread/scoped_lock.h" #include "tile/base/thread/scoped_lock.h"
@ -30,7 +29,7 @@ public:
inline void Wait() inline void Wait()
{ {
ScopedLock _(m_); ScopedLock _(m_);
cv_.Wait(m_, [this] { return signaled_; }); cv_.Wait(_, [this] { return signaled_; });
ResetIfNeeded(); ResetIfNeeded();
} }
@ -49,7 +48,7 @@ public:
bool WaitUntil(const std::chrono::time_point<Clock, Duration> &timeout_time) bool WaitUntil(const std::chrono::time_point<Clock, Duration> &timeout_time)
{ {
ScopedLock _(m_); ScopedLock _(m_);
if (cv_.WaitUntil(m_, timeout_time, [this] { return signaled_; })) { if (cv_.WaitUntil(_, timeout_time, [this] { return signaled_; })) {
ResetIfNeeded(); ResetIfNeeded();
return true; return true;
} }

View File

@ -39,7 +39,6 @@
#include "tile/base/write_mostly.h" #include "tile/base/write_mostly.h"
// Sync // Sync
#include "tile/base/thread/cond_var.h"
#include "tile/base/thread/event.h" #include "tile/base/thread/event.h"
#include "tile/base/thread/latch.h" #include "tile/base/thread/latch.h"
#include "tile/base/thread/mutex.h" #include "tile/base/thread/mutex.h"