Skip to content

Commit

Permalink
Update documentation to correct default publishing mode (#3778) (#3780)
Browse files Browse the repository at this point in the history
* Update documentation to correct default publishing mode

(cherry picked from commit 87b1737)

Co-authored-by: Giuseppe Rizzi <[email protected]>
  • Loading branch information
mergify[bot] and grizzi authored Jul 12, 2023
1 parent 0da5490 commit 6b3f20b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/Tutorials/Advanced/FastDDS-Configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ Mixing synchronous and asynchronous publications in the same node

In this first example, a node with two publishers, one of them with synchronous publication mode and the other one with asynchronous publication mode, will be created.

``rmw_fastrtps`` uses asynchronous publication mode by default.
When the publisher invokes the write operation, the data is copied into a queue,
a background thread (asynchronous thread) is notified about the addition to the queue, and control of the thread is returned to the user before the data is actually sent.
The background thread is in charge of consuming the queue and sending the data to every matched reader.
``rmw_fastrtps`` uses synchronous publication mode by default.

On the other hand, with synchronous publication mode the data is sent directly within the context of the user thread.
With synchronous publication mode the data is sent directly within the context of the user thread.
This entails that any blocking call occurring during the write operation would block the user thread, thus preventing the application from continuing its operation.
However, this mode typically yields higher throughput rates at lower latencies, since there is no notification nor context switching between threads.

On the other hand, with asynchronous publication mode, each time the publisher invokes the write operation, the data is copied into a queue,
a background thread (asynchronous thread) is notified about the addition to the queue, and control of the thread is returned to the user before the data is actually sent.
The background thread is in charge of consuming the queue and sending the data to every matched reader.

Create the node with the publishers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 6b3f20b

Please sign in to comment.