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

Fix hash implementation to not use a global mutex #1707

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

pepone
Copy link
Member

@pepone pepone commented Jan 22, 2024

This PR fixes Reference and Endpoint classes hash implementation to use an instance mutex instead of a global mutex

@pepone pepone added this to the 3.8.0 milestone Jan 22, 2024
@pepone pepone changed the title Fix Reference hash to not use a global mutex Fix hash implementation to not use a global mutex Jan 22, 2024
Copy link
Member

@bernardnormier bernardnormier left a comment

Choose a reason for hiding this comment

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

I don't think we should use any mutex in this code.

Either the hash is very cheap to compute and we compute it each time. Or it's somewhat expensive to compute (== bad hash) and we compute it in the constructor. As far as I can tell, this class is immutable.

@pepone
Copy link
Member Author

pepone commented Jan 22, 2024

I don't think we should use any mutex in this code.

I created a separate issue to fix this. I want to merge this as is as I'm getting rid of MutexPtrLock in my following PR.

@pepone pepone merged commit d63ca9e into zeroc-ice:main Jan 22, 2024
18 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