Skip to content

Properly close thread pools#6480

Merged
DomGarguilo merged 3 commits into
apache:mainfrom
DomGarguilo:closeThreadPools
Jul 20, 2026
Merged

Properly close thread pools#6480
DomGarguilo merged 3 commits into
apache:mainfrom
DomGarguilo:closeThreadPools

Conversation

@DomGarguilo

@DomGarguilo DomGarguilo commented Jul 16, 2026

Copy link
Copy Markdown
Member

Looking through the code for thread pools and looking at how the pools are shutdown/not.

A lot of pools were not shut down at all so I addressed those.

Here are some guidelines I had in mind while looking through the code:

  • try to always shutdown the pool within a finally block so things are cleaned up regardless
  • leverage an existing try block if one exists nearby to reduce churn
  • add a shutdown if none existed

I tried to keep the diff relatively small, but will definitely help to review the diff with whitespace ignored since the added try blocks add indentation

I ran all of the touched test files to make sure they all pass.

@DomGarguilo DomGarguilo added this to the 4.0.0 milestone Jul 16, 2026
@DomGarguilo DomGarguilo self-assigned this Jul 16, 2026
@DomGarguilo
DomGarguilo marked this pull request as ready for review July 16, 2026 18:47
@DomGarguilo
DomGarguilo merged commit a597967 into apache:main Jul 20, 2026
8 checks passed
@DomGarguilo
DomGarguilo deleted the closeThreadPools branch July 20, 2026 14:24
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