Commit c2ffdee
Remove blocking calls from the stats gathering path in RTCStatsCollector
Improve tests for CancelPendingRequestAndGetShutdownTasks to more
accurately simulate multithreaded shutdown. Any pending operations are
cancelled as before, but CancelPendingRequestAndGetShutdownTasks will
now optionally issue the pending callbacks immediately while also
canceling pending async operations without blocking.
Remove WaitForPendingRequest which was previously called from PC::Close.
The dependency on the transport controller is not a concern anymore.
* Introduce `worker_safety_` to guard tasks running on the worker
thread.
* Refactor `PrepareTransceiverStatsInfosAndCallStats_s_w` to return
an `absl::AnyInvocable` and pass data via function arguments
instead of storing intermediate results in `collection_context_`.
* Remove `network_report_event_` as manual synchronization is no
longer needed.
* Ensure pending requests receive callbacks immediately during
shutdown or are safely dropped if the collector is destroyed.
Bug: webrtc:42222804
Change-Id: Ibb576e46dfa77e95c072d99282f6780a6df46458
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/443460
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46747}1 parent c311a00 commit c2ffdee
6 files changed
Lines changed: 237 additions & 193 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
698 | | - | |
699 | | - | |
| 698 | + | |
| 699 | + | |
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| |||
1925 | 1925 | | |
1926 | 1926 | | |
1927 | 1927 | | |
1928 | | - | |
1929 | | - | |
1930 | | - | |
1931 | 1928 | | |
1932 | 1929 | | |
1933 | 1930 | | |
| |||
0 commit comments