aboutsummaryrefslogtreecommitdiff
path: root/rtc_base/logging_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'rtc_base/logging_unittest.cc')
-rw-r--r--rtc_base/logging_unittest.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/rtc_base/logging_unittest.cc b/rtc_base/logging_unittest.cc
index 225d66d13d..dc1208f3f6 100644
--- a/rtc_base/logging_unittest.cc
+++ b/rtc_base/logging_unittest.cc
@@ -160,18 +160,13 @@ TEST(LogTest, MultipleStreams) {
class LogThread {
public:
- LogThread() : thread_(&ThreadEntry, this, "LogThread") {}
- ~LogThread() { thread_.Stop(); }
-
- void Start() { thread_.Start(); }
+ void Start() {
+ thread_ = PlatformThread::SpawnJoinable(
+ [] { RTC_LOG(LS_VERBOSE) << "RTC_LOG"; }, "LogThread");
+ }
private:
- void Run() { RTC_LOG(LS_VERBOSE) << "RTC_LOG"; }
-
- static void ThreadEntry(void* p) { static_cast<LogThread*>(p)->Run(); }
-
PlatformThread thread_;
- Event event_;
};
// Ensure we don't crash when adding/removing streams while threads are going.