Add loaned message support to R2R#42
Merged
m-dahl merged 1 commit intosequenceplanner:masterfrom Mar 21, 2023
Merged
Conversation
Add loaned message support in R2R's subscriber to take advantage of the shared memory backend of the middleware. - Add new constructor to `WrappedNativeMsg` which takes a already allocated pointer, and a deallocator. - If the subscription can loan messages, construct `WrappedNativeMsg` with the loaned message pointer. - Pass in also a closure as the deallocator that calls the right APIs to return the loaned message to the middleware layer. - The deallocator is called in the destructor of `WrappedNativeMsg` - Add borrow_loaned_message API to publisher - Add release() api to WrappedNativeMsg so a loaded message could be manually released if not published.
Collaborator
|
Wow new feature :) That's cool. I think the patch looks good. Nice that you are finding use for the "native" messages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add loaned message support in R2R's subscriber to
take advantage of the shared memory backend of the middleware.
WrappedNativeMsgwhich takes a already allocated pointer, and a deallocator.WrappedNativeMsgwith the loaned message pointer.WrappedNativeMsg