Remove the PendingTaskSafetyFlag::Pointer type add ScopedTaskSafety.

ScopedTaskSafety simplifies usage of PendingTaskSafetyFlag,
so this CL also includes ToQueuedTask support for ScopedTaskSafety
and test updates.

This is following up on feedback in the following CL:
https://webrtc-review.googlesource.com/c/src/+/174262

Change-Id: Idd38dfc1914b24a05fdc4ad256b409dcf1795fc0
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174740
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31241}
This commit is contained in:
Tommi
2020-05-13 15:06:19 +02:00
committed by Commit Bot
parent ff88a64b67
commit a98cea863d
13 changed files with 107 additions and 72 deletions

View File

@ -70,8 +70,7 @@ class RtpStreamsSynchronizer {
bool timer_running_ RTC_GUARDED_BY(main_checker_) = false;
// Used to signal destruction to potentially pending tasks.
PendingTaskSafetyFlag::Pointer task_safety_flag_ =
PendingTaskSafetyFlag::Create();
ScopedTaskSafety task_safety_;
};
} // namespace internal