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

Replace AtomicReference usages with VarHandle #872

sbordet opened this issue Jul 17, 2019 · 1 comment


Copy link

commented Jul 17, 2019

There is no need in CometD 6 and JDK 11 to allocate an AtomicReference for atomic state machines, because they can be done using VarHandle.

See AsyncFoldLeft implementation.


This comment has been minimized.

Copy link
Member Author

commented Jul 17, 2019

Failures can just be stored in a volatile field; the last failure will be remembered instead of the first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.