Migrate remaining webrtc usage of TaskQueueBase to absl::AnyInvocable

Bug: webrtc:14245
Change-Id: I8de2c23da5fbdfc0b1efbbe07fb6e8de744424a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268191
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37565}
This commit is contained in:
Danil Chapovalov
2022-07-19 13:07:12 +02:00
committed by WebRTC LUCI CQ
parent 489f648ea3
commit c05a1be5b4
37 changed files with 85 additions and 140 deletions

View File

@ -11,8 +11,6 @@
#include "sdk/objc/native/src/objc_network_monitor.h"
#include "absl/strings/string_view.h"
#include "api/task_queue/to_queued_task.h"
#include <algorithm>
#include "rtc_base/logging.h"
@ -87,7 +85,7 @@ rtc::NetworkMonitorInterface::InterfaceInfo ObjCNetworkMonitor::GetInterfaceInfo
void ObjCNetworkMonitor::OnPathUpdate(
std::map<std::string, rtc::AdapterType, rtc::AbslStringViewCmp> adapter_type_by_name) {
RTC_DCHECK(network_monitor_ != nil);
thread_->PostTask(ToQueuedTask(safety_flag_, [this, adapter_type_by_name] {
thread_->PostTask(SafeTask(safety_flag_, [this, adapter_type_by_name] {
RTC_DCHECK_RUN_ON(thread_);
adapter_type_by_name_ = adapter_type_by_name;
InvokeNetworksChangedCallback();