Handle possible deadlocks and hangs during PeerConnection teardown Address two issues related to thread shutdown and teardown when the target thread (network/worker) has been instructed to quit before the PeerConnection destruction has completed: 1. In ScopedOperationsBatcher::Run(), if the target thread drops tasks (e.g., because it is quitting), the loop would previously run infinitely because task_idx did not advance. We now detect this by verifying that task_idx has progressed after the BlockingCall, and abort if it has not. 2. In MethodCall::Marshal and ConstMethodCall::Marshal, if the target thread drops the task because it is quitting, the calling thread would previously hang forever because event_.Set() was never called. We now use absl::Cleanup to ensure the event is set on task destruction. Bug: b/515407473 Change-Id: Iea8ec32b6a9e9850983ed563db07b5c386ad834d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/479140 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47930}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.