Migrate rtc_base and rtc_tools to absl::AnyInvocable based TaskQueueBase interface

Bug: webrtc:14245
Change-Id: I71abe3db7a23ad33bd175297e23fa8e927fa9628
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268768
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37553}
This commit is contained in:
Danil Chapovalov
2022-07-18 17:04:56 +02:00
committed by WebRTC LUCI CQ
parent 049dde6c8e
commit 5286dcfab6
19 changed files with 116 additions and 143 deletions

View File

@ -67,7 +67,7 @@ void TestController::SendConnectTo(const std::string& hostname, int port) {
void TestController::SendData(const NetworkTesterPacket& packet,
absl::optional<size_t> data_size) {
if (!packet_sender_thread_->IsCurrent()) {
packet_sender_thread_->PostTask(ToQueuedTask(
packet_sender_thread_->PostTask(SafeTask(
task_safety_flag_,
[this, packet, data_size]() { this->SendData(packet, data_size); }));
return;