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

Prefactoring for future changes that will avoid using Unsafe. #7548

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

copybara-service[bot]
Copy link
Contributor

Prefactoring for future changes that will avoid using Unsafe.

See #6806 (comment).

Changes:

  • "SafeAtomicHelper" is arguably already too generic a name for that class, given that we have a SynchronizedAtomicHelper that also avoids using Unsafe. It's going to become even more overly generic (and more overly scary) when we likely introduce a VarHandle-based alternative. (And maybe we'll even remove the Unsafe-based one entirely?) Rename it.
  • Remove Javadoc from implementation classes, since it merely duplicates that from the superclass.
  • Fix links in the (package-private) Javadoc.

I considered also renaming the AtomicHelper methods to match the terminology of VarHandle. This would mean only renaming putThread+putNext to... setReleaseThread? setThreadReleasedly? setThreadUsingReleaseAccessMode? I didn't find anything that I particularly liked.

RELNOTES=n/a

See #6806 (comment).

Changes:

- "`SafeAtomicHelper`" is arguably already too generic a name for that class, given that we have a `SynchronizedAtomicHelper` that also avoids using `Unsafe`. It's going to become even more overly generic (and more overly scary) when we likely introduce a `VarHandle`-based alternative. (And maybe we'll even remove the `Unsafe`-based one entirely?) Rename it.
- Remove Javadoc from implementation classes, since it merely duplicates that from the superclass.
- Fix links in the (package-private) Javadoc.

I considered also renaming the `AtomicHelper` methods to match the terminology of `VarHandle`. This would mean only renaming `putThread`+`putNext` to... `setReleaseThread`? `setThreadReleasedly`? `setThreadUsingReleaseAccessMode`? I didn't find anything that I particularly liked.

RELNOTES=n/a
PiperOrigin-RevId: 705868797
@copybara-service copybara-service bot merged commit 660e5dc into master Dec 13, 2024
2 checks passed
@copybara-service copybara-service bot deleted the test_705587524 branch December 13, 2024 14:55
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.

1 participant