-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[UNDERTOW-1758] make state field atomic in HttpServerExchange #1560
base: 2.2.x
Are you sure you want to change the base?
[UNDERTOW-1758] make state field atomic in HttpServerExchange #1560
Conversation
@@ -480,9 +483,9 @@ public HttpServerExchange setRequestURI(final String requestURI) { | |||
public HttpServerExchange setRequestURI(final String requestURI, boolean containsHost) { | |||
this.requestURI = requestURI; | |||
if (containsHost) { | |||
this.state |= FLAG_URI_CONTAINS_HOST; | |||
stateUpdater.accumulateAndGet(this, FLAG_URI_CONTAINS_HOST, (state, flag) -> state | flag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps these lambdas could be extracted to static reusable instances -- sometimes lambdas like this in hot paths aren't elided as quickly as one might wish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a premature optimization?
|
https://issues.redhat.com/browse/UNDERTOW-1758