Adds ability to tell Event::Wait to yield.
This will be used by simulated time controller to allow processing other
tasks while waiting on an Event. This makes posting of blocking tasks
possible.
Bug: webrtc:10365
Change-Id: Ic3fb156d545eed2c036939121b89295433176e26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128121
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27214}
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 8ca719d..c5531bf 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -258,6 +258,7 @@
"../../webrtc_overrides/rtc_base/event.h",
]
} else {
+ deps += [ "synchronization:yield_policy" ]
sources = [
"event.cc",
"event.h",
@@ -1409,6 +1410,7 @@
"../test:field_trial",
"../test:fileutils",
"../test:test_support",
+ "synchronization:synchronization_unittests",
"third_party/sigslot",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",