Remove unused GuardedAsyncInvoker class

Bug: none
Change-Id: I0d05964c9be8a692f1589b4cebc84ee48c91be20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178864
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31669}
This commit is contained in:
Tomas Gunnarsson
2020-07-08 10:24:31 +02:00
committed by Commit Bot
parent 122fadc608
commit b504780c42
3 changed files with 0 additions and 212 deletions

View File

@ -101,28 +101,6 @@ void AsyncInvoker::DoInvokeDelayed(const Location& posted_from,
new ScopedMessageData<AsyncClosure>(std::move(closure)));
}
GuardedAsyncInvoker::GuardedAsyncInvoker() : thread_(Thread::Current()) {
thread_->SignalQueueDestroyed.connect(this,
&GuardedAsyncInvoker::ThreadDestroyed);
}
GuardedAsyncInvoker::~GuardedAsyncInvoker() {}
bool GuardedAsyncInvoker::Flush(uint32_t id) {
CritScope cs(&crit_);
if (thread_ == nullptr)
return false;
invoker_.Flush(thread_, id);
return true;
}
void GuardedAsyncInvoker::ThreadDestroyed() {
CritScope cs(&crit_);
// We should never get more than one notification about the thread dying.
RTC_DCHECK(thread_ != nullptr);
thread_ = nullptr;
}
AsyncClosure::AsyncClosure(AsyncInvoker* invoker)
: invoker_(invoker), invocation_complete_(invoker_->invocation_complete_) {
invoker_->pending_invocations_.fetch_add(1, std::memory_order_relaxed);