Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: webrtc/video/rampup_tests.cc

Issue 1378303004: Avoid race in RampUpTest (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/rampup_tests.cc
diff --git a/webrtc/video/rampup_tests.cc b/webrtc/video/rampup_tests.cc
index 25352e47edb50455ce2f5b85778dca715d1833fb..526f4a4f768954fb9952945426033a73ac850bf2 100644
--- a/webrtc/video/rampup_tests.cc
+++ b/webrtc/video/rampup_tests.cc
@@ -68,12 +68,10 @@ RampUpTester::RampUpTester(size_t num_streams,
for (size_t i = 0; i < ssrcs_.size(); ++i)
rtx_ssrc_map_[rtx_ssrcs_[i]] = ssrcs_[i];
}
- poller_thread_->Start();
}
RampUpTester::~RampUpTester() {
event_.Set();
- poller_thread_->Stop();
}
Call::Config RampUpTester::GetSenderCallConfig() {
@@ -264,11 +262,13 @@ void RampUpTester::TriggerTestDone() {
}
void RampUpTester::PerformTest() {
+ poller_thread_->Start();
if (Wait() != kEventSignaled) {
printf("Timed out while waiting for ramp-up to complete.");
return;
}
TriggerTestDone();
+ poller_thread_->Stop();
}
RampUpDownUpTester::RampUpDownUpTester(size_t num_streams,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698