Skip to content

Replace AtomicBoolean with AtomicFieldUpdater #1291

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

Merged
merged 1 commit into from
Oct 27, 2016

Conversation

stepancheg
Copy link
Contributor

Avoid unnecessary heap allocations.

Currently in my app I have 100K AtomicBoolean objects with 50K more created per second in async-http-client futures. Probably it is not a big deal, but it is better not to allocate anyway.

Avoid unnecessary heap allocations.
@slandelle
Copy link
Contributor

I really can't remember why I did replace AtomicInteger fields with FieldUpdaters and not the AtomicBooleans too?!
Thanks a bunch!

PS: I'll rename some getters to isSomething.

@slandelle slandelle merged commit 4c61d39 into AsyncHttpClient:master Oct 27, 2016
@slandelle slandelle added this to the 2.0.20 milestone Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants