Mark rtc::Thread's versions of PostTask/PostDelayedTask deprecated.
Because rtc::Thread inherits from TaskQueueBase, it already implements a pair of PostTask/PostDelayedTask methods that we want to keep. But in addition to those, rtc::Thread defines its own PostTask/PostDelayedTask using templates. These are the versions that we want to deprecate. They were originally implemented prior to rtc::Thread inheriting from TaskQueueBase. We want to deprecate them because... - We don't want to have multiple code paths that do the same thing. - We want to move away from rtc::Thread to TaskQueueBase long-term. - These versions are not overridable in Chromium. - These versions don't have high/low precision versions of PDT. Helper methods are added to rtc::Thread so that callers don't have to wrap every lambda in webrtc::ToQueuedTask() and update dependencies. Bug: webrtc:13582 Change-Id: I58702c53f4cb3705681bd9f1ea16b7aaa5052c18 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247660 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Reviewed-by: Markus Handell <handellm@google.com> Commit-Queue: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35750}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
c065e739e2
commit
2deee4bbb2
@ -288,7 +288,7 @@ OCMLocation *OCMMakeLocation(id testCase, const char *fileCString, int line){
|
||||
rtc::Event waitLock;
|
||||
rtc::Event waitCleanup;
|
||||
constexpr int timeoutMs = 5000;
|
||||
thread->PostTask(RTC_FROM_HERE, [audioSession, &waitLock, &waitCleanup] {
|
||||
thread->PostTask([audioSession, &waitLock, &waitCleanup] {
|
||||
[audioSession lockForConfiguration];
|
||||
waitLock.Set();
|
||||
waitCleanup.Wait(timeoutMs);
|
||||
|
||||
Reference in New Issue
Block a user