FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: shut down executeAsync executor by arnabnandy7 · Pull Request #2172 · googleapis/google-http-java-client · GitHub

fix: shut down executeAsync executor - #2172

Open
arnabnandy7 wants to merge 1 commit into
googleapis:mainfrom
arnabnandy7:fix/execute-async-thread-leak
Open

fix: shut down executeAsync executor#2172
arnabnandy7 wants to merge 1 commit into
googleapis:mainfrom
arnabnandy7:fix/execute-async-thread-leak

Conversation

Copy link
Copy Markdown

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #2122 ☕️

Description

Shuts down the executor created by the zero-argument HttpRequest.executeAsync() after submitting the request. Previously, every invocation created a fixed thread pool that was never shut down, leaving its worker thread alive indefinitely.

The executor is shut down in a finally block, allowing the submitted request to finish while ensuring its worker thread terminates afterward.

Testing

  • Added a regression test that executes multiple asynchronous requests and verifies that the executor threads terminate.
  • Ran HttpRequestTest: 44 tests passed.
  • Applied Google Java Format.
  • Verified the changes with git diff --check.

No sample code was added.

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
arnabnandy7 requested a review from a team as a code owner July 18, 2026 06:21
product-auto-label Bot added the size: m Pull request size is medium. label Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HttpRequest#executeAsync leaks a thread on every call

1 participant


Back | FazBrowse Home | New Git URL