Migrate test/ to absl::AnyInvocable based TaskQueueBase interface
Bug: webrtc:14245
Change-Id: Ib410d1b03a23e5f00927456f7239c0dc7e68b824
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268184
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37497}
diff --git a/test/run_loop.cc b/test/run_loop.cc
index adce7ff..d54b4a4 100644
--- a/test/run_loop.cc
+++ b/test/run_loop.cc
@@ -9,7 +9,6 @@
*/
#include "test/run_loop.h"
-#include "api/task_queue/to_queued_task.h"
#include "rtc_base/time_utils.h"
namespace webrtc {
@@ -36,8 +35,7 @@
}
void RunLoop::Flush() {
- worker_thread_.PostTask(
- ToQueuedTask([this]() { socket_server_.FailNextWait(); }));
+ worker_thread_.PostTask([this]() { socket_server_.FailNextWait(); });
// If a test clock is used, like with GlobalSimulatedTimeController then the
// thread will loop forever since time never increases. Since the clock is
// simulated, 0ms can be used as the loop delay, which will process all