mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
doc: using triple backticks instead of <pre> blocks
While <pre> HTML tag blocks are allowed in both commonmark specification and commonmark-java, for some reason, webrtc.googlesource.com using gitiles doesn't render that block. [1] It's probably because of the stricter conditions of the gitiles HTML extension. [2] So use a much more portable code block syntax (triple backticks). [1] https://webrtc.googlesource.com/src/+/5900ba0ee8f3f9cef3b29becbb4335b8f440d57d/api/g3doc/threading_design.md [2] https://gerrit.googlesource.com/gitiles/+/f65ff3b7bfc36f8426aa0199220b111e14ff92ee/java/com/google/gitiles/doc/GitilesHtmlExtension.java#32 Bug: None Change-Id: Ie83bbb7e26dec5225cd79b926b97529e33a37149 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225360 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34433}
This commit is contained in:
parent
f715618eee
commit
0c5a5ca45f
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ and sequenced task queues.
|
|||
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
|
||||
and event handlers like this (pseudocode):
|
||||
<pre>
|
||||
```
|
||||
void ObserverClass::Handler(event) {
|
||||
if (!called_on_client_thread()) {
|
||||
dispatch_to_client_thread(bind(handler(event)));
|
||||
|
@ -45,7 +45,7 @@ void ObserverClass::Handler(event) {
|
|||
}
|
||||
// Process event, we're now on the right thread
|
||||
}
|
||||
</pre>
|
||||
```
|
||||
In the future, the implementation may change to always call the callbacks
|
||||
and event handlers on the client thread.
|
||||
|
||||
|
|
Loading…
Reference in a new issue