DescriptionUse SingleThreadedTaskQueue in DirectTransport
DirectTransport has so far used its own thread, which led to a different threading-model for in the unit-tests than is used in actual WebRTC. Because of that, some critical-sections that weren't truly necessary in WebRTC could not be replaced with thread-checks, because those checks failed in unit-tests.
This CL introduces SingleThreadedTaskQueue - a TaskQueue which guarantees to run all of its tasks on the same thread (rtc::TaskQueue doesn't guarantee that on Mac) - and uses that for DirectTransport. CLs based on top of this will uncomment thread-checks which had to be commented out before, and remove unnecessary critical-sections.
Future work would probably replace the thread-checkers by more sophisticated serialized-access checks, allowing us to move from the SingleThreadedTaskQueue to a normal TaskQueue.
Related implementation notes:
* This CL has made DirectTransport::StopSending() superfluous, and so it was deleted.
BUG=webrtc:8113, webrtc:7405, webrtc:8056, webrtc:8116
Review-Url: https://codereview.webrtc.org/2998923002
Cr-Commit-Position: refs/heads/master@{#19445}
Committed: https://chromium.googlesource.com/external/webrtc/+/413ee9a010eca70712a6935c68b815201bee1270
Patch Set 1 #
Total comments: 7
Patch Set 2 : Unit-tests added. #Patch Set 3 : . #Patch Set 4 : Added PostDelayedTask #Patch Set 5 : Rebase + fix some tests on Linux. #Patch Set 6 : . #Patch Set 7 : . #
Total comments: 20
Patch Set 8 : Response to nisse's CR. #
Total comments: 10
Patch Set 9 : Response to nisse's CR. #Patch Set 10 : Handle deprecated functions for internal projects. #Patch Set 11 : Sequenced-checker dependency. #Patch Set 12 : Fix perf-tests. #Patch Set 13 : Release capturer on correct thread. #Patch Set 14 : Fix video_loopback teardown on Linux. #Patch Set 15 : Some fixes. #Patch Set 16 : Appease win_msvc_rel. #
Total comments: 2
Messages
Total messages: 59 (29 generated)
|