google-cloud-cpp icon indicating copy to clipboard operation
google-cloud-cpp copied to clipboard

Consider a constructor consuming `CompletionQueue` for `AsyncClient`

Open coryan opened this issue 3 years ago • 0 comments

As @dbolduc reminded me, the design docs calls for no automated background threads. I think we should refactor the existing classes to something like:

class CompletionQueueServicePool {
 public:
  /// Create a thread pool of size @p size to service @p cq.
  CompletionQueueServicePool(CompletionQueue cq, std::size_t size);
};

And then the AsyncClient factory becomes:

AsyncClient MakeAsyncClient(CompletionQueue cq, Options options = {});

coryan avatar Jun 03 '22 03:06 coryan