Revert back to using the task_queue_ for guarding access.

This removes the SequenceChecker that was temporarily used while
the rtc::Thread TQ implementation was being fixed.

Bug: none
Change-Id: Iaa46e47371211ac0a97b2dcaf23cef12b43ee8ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175081
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31256}
This commit is contained in:
Tommi
2020-05-14 13:28:29 +02:00
committed by Commit Bot
parent 97755813dd
commit 475006d4a3
2 changed files with 3 additions and 12 deletions

View File

@ -21,13 +21,12 @@ RepeatingTaskBase::RepeatingTaskBase(TaskQueueBase* task_queue,
TimeDelta first_delay)
: task_queue_(task_queue),
next_run_time_(Timestamp::Micros(rtc::TimeMicros()) + first_delay) {
sequence_checker_.Detach();
}
RepeatingTaskBase::~RepeatingTaskBase() = default;
bool RepeatingTaskBase::Run() {
RTC_DCHECK_RUN_ON(&sequence_checker_);
RTC_DCHECK_RUN_ON(task_queue_);
// Return true to tell the TaskQueue to destruct this object.
if (next_run_time_.IsPlusInfinity())
return true;
@ -53,7 +52,7 @@ bool RepeatingTaskBase::Run() {
}
void RepeatingTaskBase::Stop() {
RTC_DCHECK_RUN_ON(&sequence_checker_);
RTC_DCHECK_RUN_ON(task_queue_);
RTC_DCHECK(next_run_time_.IsFinite());
next_run_time_ = Timestamp::PlusInfinity();
}