feat: create a generic wrapper for gRPC and REST pure background thre… by bajajneha27 · Pull Request #16154 · googleapis/google-cloud-cpp · GitHub
Skip to content

feat: create a generic wrapper for gRPC and REST pure background thre…#16154

Open
bajajneha27 wants to merge 4 commits into
googleapis:mainfrom
bajajneha27:generic-background-thread
Open

feat: create a generic wrapper for gRPC and REST pure background thre…#16154
bajajneha27 wants to merge 4 commits into
googleapis:mainfrom
bajajneha27:generic-background-thread

Conversation

@bajajneha27

Copy link
Copy Markdown
Contributor

…ad impl

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the background thread creation logic by introducing a generic template class, AutomaticallyCreatedBackgroundThreadsImpl, to consolidate duplicate code from both gRPC and REST background thread implementations. However, the reviewer identified a critical issue where this generic implementation breaks REST pure background threads due to invalid default-construction of RestPureCompletionQueue and the omission of internal::CallContext setup. To resolve this, the reviewer suggested introducing a customizable QueueTraits template parameter to handle queue-specific initialization and execution logic.

Comment thread google/cloud/internal/generic_background_threads_impl.h Outdated
Comment thread google/cloud/internal/rest_pure_background_threads_impl.h
Comment thread google/cloud/internal/rest_pure_background_threads_impl.h Outdated
@bajajneha27 bajajneha27 marked this pull request as ready for review June 12, 2026 12:25
@bajajneha27 bajajneha27 requested a review from a team as a code owner June 12, 2026 12:25
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this file is now empty, let's delete it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this file is now empty, let's delete it.

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