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

Added comments to connection's implementation #2047

Merged
merged 6 commits into from
Apr 17, 2024

Conversation

bentoi
Copy link
Member

@bentoi bentoi commented Apr 15, 2024

This PR adds comments to Connection::message implementation.

@bentoi bentoi requested a review from bernardnormier April 15, 2024 10:19
cpp/src/Ice/ConnectionI.h Show resolved Hide resolved
@@ -576,7 +576,7 @@ Ice::ConnectionI::waitUntilFinished()
// guarantee that there are no outstanding calls when deactivate()
// is called on the servant locators.
//
_conditionVariable.wait(lock, [this] { return _state >= StateFinished && _dispatchCount == 0; });
_conditionVariable.wait(lock, [this] { return _state >= StateFinished && _upcallCount == 0; });
Copy link
Member

Choose a reason for hiding this comment

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

It's not clear to me why we wait for all upcalls to complete. The comment mentions servant locators but servant locators only care about dispatches. Once we have an actual dispatch count, should we use it here instead of _upcallCount?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's about providing the guarantee that no more upcalls are running once the communicator destroy method returns.

cpp/src/Ice/ConnectionI.cpp Show resolved Hide resolved
cpp/src/Ice/ConnectionI.cpp Outdated Show resolved Hide resolved
cpp/src/Ice/ConnectionI.cpp Show resolved Hide resolved
cpp/src/Ice/ConnectionI.cpp Outdated Show resolved Hide resolved
cpp/src/Ice/ConnectionI.cpp Show resolved Hide resolved
cpp/src/Ice/ConnectionI.cpp Outdated Show resolved Hide resolved
cpp/src/Ice/ConnectionI.cpp Show resolved Hide resolved
@bentoi bentoi merged commit c41d198 into zeroc-ice:main Apr 17, 2024
23 checks passed
InsertCreativityHere pushed a commit to InsertCreativityHere/compiler-comparison that referenced this pull request Jan 1, 2025
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.

2 participants