Skip to content
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

Update ObjectAdapter deactivate semantics in C++ #2895

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

bernardnormier
Copy link
Member

Also add Communicator::get/setDefaultObjectAdapter in C++, Swift and Python.

It's the C++ version of #2888 and #2894.

IceInternal::OutgoingConnectionFactory::setDefaultObjectAdapter(ObjectAdapterPtr adapter) noexcept
{
lock_guard lock(_mutex);
_defaultObjectAdapter = dynamic_pointer_cast<ObjectAdapterI>(adapter);
Copy link
Member

Choose a reason for hiding this comment

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

Should we assert the cast succeed?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is no situation where this dynamic_pointer_cast can fail.

If you're concerned about users creating their own ObjectAdapter, we can make ObjectAdapter's constructor protected.

Copy link
Member

@externl externl left a comment

Choose a reason for hiding this comment

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

Looks good!

swift/src/IceImpl/include/Communicator.h Outdated Show resolved Hide resolved
@bernardnormier bernardnormier merged commit 78c3fbf into zeroc-ice:main Oct 15, 2024
10 of 11 checks passed
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.

3 participants