Create MessageMemoryStrategy for subscribers#64
Conversation
There was a problem hiding this comment.
What happens when this is called from multiple threads, i.e. when queue_size is greater than 1 and a multithreaded executor is used?
There was a problem hiding this comment.
I agree, it should be possible to make a solid reset function using the generated code. Though it probably needs to be a free function that takes the message as an argument, to avoid collisions with a message field called reset. Either that or the reset function would need to contain __ somewhere.
|
summary of changes: Generalized |
There was a problem hiding this comment.
Since all three arrays use the same index wouldn't it make sense to only have one array which contains a struct with three members?
To avoid
newwhenever a message is received by the subscriber, abstract out the memory strategy for subscribers.MessageMemoryStrategyis templated on the message type and gets passed to the subscriber constructor.Example usage in ros2/examples#39