Skip to content

Conversation

@Yuchen966
Copy link

Description

Updates some explanation of intra-process communication demo document to reflect the actual current behavior with respect to function publish():

  • shared_ptr messages: Cannot be published (removed incorrect zero-copy claims)
  • unique_ptr messages: Zero-copy transfer achieved for the last subscriber
  • raw messages: Both msg and std::move(msg) result in copying

Key changes:

  • Add notes about current behaviour
  • Correct the explanation that all subcribers except for the last one will receive copies of published messages.

Fixes issue

Did you use Generative AI?

No

Additional Information


**std::unique_ptr messages:**
- Zero-copy transfer is achieved for the first subscriber
- Additional subscribers receive copies of the message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these statements are not really correct.
you can't infer this from publisher alone, but only from the combination of publisher and subscriber.

Comment on lines +167 to +168
Understanding publish() behavior with different message types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra '~'?

Suggested change
Understanding publish() behavior with different message types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Understanding publish() behavior with different message types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@fujitatomoya
Copy link
Collaborator

@Mergifyio rebase

@mergify
Copy link
Contributor

mergify bot commented Nov 16, 2025

rebase

✅ Branch has been successfully rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rclcpp does not support zero-copy intra-process communication for shared_ptr or std::move raw messages

3 participants