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

AtomicLongPosition plain methods fix. #322

Conversation

pveentjer
Copy link
Contributor

@pveentjer pveentjer commented Feb 3, 2025

The methods AtomicLongPosition.get and AtomicLongPosition.set, which have plain semantics according to the documentation, are calling AtomicLong.get/set which have volatile semantics. So they are calling methods that are more thread-safe than needed, leading to a potential performance penalty.

The same methods on the UnsafeBufferPosition, do call the right plain methods.

The methods get and set, which have plain semantics, where calling
AtomicLong.get/set which  have volatile semantics.

So they were calling methods with were more thread-safe than needed.
@pveentjer pveentjer added the bug label Feb 3, 2025
@pveentjer pveentjer requested a review from vyazelenko February 3, 2025 06:22
@vyazelenko vyazelenko merged commit 80f1328 into aeron-io:master Feb 3, 2025
23 checks passed
@pveentjer pveentjer deleted the fix/AtomicLongPosition-plain-methods-fix branch February 3, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants