-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16647] Use shared_ptr for internal singletons #3185
Conversation
f75eecc
to
acb6087
Compare
@richiprosima Please test this. |
@richiprosima Please test this |
5340565
to
4eb1d6c
Compare
@richiprosima Please test this |
0bedfd3
to
c2aa5dc
Compare
@richiprosima Please test this |
8c9c4d2
to
4d91f1e
Compare
@richiprosima Please test this |
4d91f1e
to
ed421d6
Compare
@richiprosima Please test this |
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
…Impl instance. Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
…ory. Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
…thread. Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
ed421d6
to
8261245
Compare
@richiprosima Please test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@richiprosima please test this |
… function execution. Signed-off-by: Miguel Company <[email protected]>
d2458f0
to
69f3834
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still LGTM.
@Mergifyio backport 2.8.x |
* Refs #16647. Moved RTPSDomain::getNewId to source file. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Moved RTPSDomain implementation to RTPSDomainImpl. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Using shared_ptr for singleton data. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. DomainParticipantFactory keeps a reference to RTPSDomainImpl instance. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Use method to access Log resources. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Refactor Log KillThread. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Using shared_ptr for Log Resouces. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Rename struct into LogResources. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Rename instance getter. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Make instance getter available on private header. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. DomainParticipantFactory keeps a reference to LogResources. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Removed unused method for_each_participant. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Add instance getter to RTPSDomainImpl mock. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Moved mock for clientServerEnvironmentCreationOverride. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Allow injection of custom exit work registration. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. New helper singleton for registering atexit functions. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Using new helper for registering boost at_exit_work. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. SharedSegmentBase keeps reference to BoostAtExitRegistry Signed-off-by: Miguel Company <[email protected]> * Refs #16647. RobustInterprocessCondition keeps reference to BoostAtExitRegistry Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Removed AuxiliaryBoostFunctor from DomainParticipantFactory. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Add src/cpp to include directories when using try_compile Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Keep raw reference to resources on Log::Run. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Safety checks on LogResources::KillThread. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Kill log thread on test shutdown. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Moved Log::preprocess to LogResources. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Moved Log::run to LogResources. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Moved Log implementation to LogResources. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. Flush log on destruction of LogResources before killing thread. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. LogResources moved into detail namespace. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. LogResources attributes made private. Signed-off-by: Miguel Company <[email protected]> * Refs #16647. BoostAtExitRegistry allows registering a function during function execution. Signed-off-by: Miguel Company <[email protected]> Signed-off-by: Miguel Company <[email protected]> (cherry picked from commit f6670e3) # Conflicts: # src/cpp/rtps/RTPSDomain.cpp # src/cpp/utils/shared_memory/SharedMemSegment.hpp
✅ Backports have been created
|
Description
The changes include using shared pointers for the internal singletons of RTPSDomainImpl and LogResources, and keeping a reference to both on DomainParticipantFactory.
I consider the changes ABI safe, because the only ABI incompatibility is on the size of DomainParticipantFactory, where two shared pointers are added at the end. Since the factory cannot be directly constructed by the user (and thus cannot be instantiated on the stack), there's no way of having ABI issues. I already checked that by building the examples before the changes, and updating the shared library after the changes.
This is related to #2537, and can be considered a follow-up of #2894.
@Mergifyio backport 2.8.x
Contributor Checklist
versions.md
file (if applicable).Reviewer Checklist