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

Reuse DefaultThreadFactory #3285

Merged
merged 1 commit into from May 9, 2020

Conversation

dennyac
Copy link
Contributor

@dennyac dennyac commented May 9, 2020

Problem:

The current default thread factory creates a new DefaultThreadFactory instance whenever a new thread is constructed

Solution:

Just reusing the same threadFactory per executorService

Result:

Will reduce object creation when requesting new threads

@pkwarren pkwarren self-requested a review May 9, 2020 18:06
Copy link
Contributor

@pkwarren pkwarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks for the contribution.

@pkwarren pkwarren merged commit 2d33a4a into dropwizard:master May 9, 2020
@jplock jplock added this to the 2.1.0 milestone May 9, 2020
@jplock
Copy link
Member

jplock commented May 9, 2020

We’ll need to merge this into the release/2.0.x branch as well

@joschi joschi modified the milestones: 2.1.0, 2.0.10 May 10, 2020
joschi pushed a commit that referenced this pull request May 17, 2020
(cherry picked from commit 2d33a4a)
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.

None yet

4 participants