From 6b3f20b6fd7bbbf2d6a11ecbd35c14b77a95e5bb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 10:16:02 -0400 Subject: [PATCH] Update documentation to correct default publishing mode (#3778) (#3780) * Update documentation to correct default publishing mode (cherry picked from commit 87b1737d116731b7344549a3234e2d9771873345) Co-authored-by: Giuseppe Rizzi --- source/Tutorials/Advanced/FastDDS-Configuration.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/Tutorials/Advanced/FastDDS-Configuration.rst b/source/Tutorials/Advanced/FastDDS-Configuration.rst index 2f1bb80b96..19c3e6ffa5 100644 --- a/source/Tutorials/Advanced/FastDDS-Configuration.rst +++ b/source/Tutorials/Advanced/FastDDS-Configuration.rst @@ -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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^