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 keeps usage of ToQueuedTask consistent and avoids callers having
to add additional boiler plate when using the safety flag.
From this:
tq->PostTask(ToQueuedTask([safety = my_safety_flag_]() {
if (!safety->alive())
return;
Foo();
});
to this:
tq->PostTask(ToQueuedTask(my_safety_flag_, []() {
Foo();
});
Bug: none
Change-Id: I205af56a64dd9839eb845321083d533140d614ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174262
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31161}
to make it usable without need to depend on rtc_task_queue
Bug: webrtc:10191
Change-Id: I2ae1445cf5d498aa6928d66b6823f2f940987767
Reviewed-on: https://webrtc-review.googlesource.com/c/125084
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26942}