Skip to content

Conversation

yanglifan
Copy link
Contributor

This contribution will make Hystrix run faster in JDK 6. Since when create a HystrixCommand, HystrixThreadPoolDefault.touchConfig will be executed, then executeThreadPoolExecutor.setCorePoolSize and ThreadPoolExecutor.setMaximumPoolSize. These two methods will execute mainLock.lock() all the time. That is negative to the performance.

The improve is to check whether pool size will be changed or not before set this value.

This contribution will not affect JDK 7 and 8.

@mattrjacobs
Copy link
Contributor

Thanks, @yanglifan! I agree that the CI failure is unrelated. I'll merge in your PR and then get that unit test addressed

@mattrjacobs mattrjacobs merged commit c86931b into Netflix:master Jun 17, 2016
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.

2 participants