Move threading documentation for API into g3doc structure

Bug: webrtc:12674
Change-Id: I49bb46b4e505f89ce8d56c469a8995779edf1f28
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214969
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33690}
This commit is contained in:
Harald Alvestrand 2021-04-12 11:47:56 +00:00 committed by Commit Bot
parent a3575cb848
commit 4af6f2b337
3 changed files with 20 additions and 4 deletions

13
api/g3doc/index.md Normal file
View File

@ -0,0 +1,13 @@
<?% config.freshness.owner = 'hta' %?>
<?% config.freshness.reviewed = '2021-04-12' %?>
# The WebRTC API
The public API of the WebRTC library consists of the api/ directory and
its subdirectories. No other files should be depended on by webrtc users.
Before starting to code against the API, it is important to understand
some basic concepts, such as:
* Memory management, including webrtc's reference counted objects
* [Thread management](threading_design.md)

View File

@ -1,4 +1,6 @@
# Design considerations
<?% config.freshness.owner = 'hta' %?>
<?% config.freshness.reviewed = '2021-04-12' %?>
# API Threading Design considerations
The header files in this directory form the API to the WebRTC library
that is intended for client applications' use.
@ -30,7 +32,7 @@ the two calls.
sequential execution - other names for such constructs are task runners
and sequenced task queues.
# Client threads and callbacks
## Client threads and callbacks
At the moment, the API does not give any guarantee on which thread* the
callbacks and events are called on. So it's best to write all callback
@ -47,7 +49,7 @@ void ObserverClass::Handler(event) {
In the future, the implementation may change to always call the callbacks
and event handlers on the client thread.
# Implementation considerations
## Implementation considerations
The C++ classes that are part of the public API are also used to derive
classes that form part of the implementation.

View File

@ -2,7 +2,8 @@
* How to contribute
* Code
* [Documentation](/g3doc/how_to_write_documentation.md)
* Public C++ API
* [Public C++ API](/api/g3doc/index.md)
* [Threading](/api/g3doc/threading_design.md)
* Implementation
* Network
* Congestion control and bandwidth estimation