Connections need to perform background work on behalf of the application. Normally they just create a background thread and a CompletionQueue for this work, but the application may need more fine-grained control of their threads.
In this case the application can provide its own BackgroundThreadsFactory and it assumes responsibility for creating one or more threads blocked on its CompletionQueue::Run().
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThis page lists various versions of the \u003ccode\u003eGrpcBackgroundThreadsFactoryOption\u003c/code\u003e, ranging from the latest release candidate version 2.37.0-rc down to version 2.10.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBackgroundThreadsFactory\u003c/code\u003e can be customized by applications needing more control over their threads, overriding the default behavior where background threads and a \u003ccode\u003eCompletionQueue\u003c/code\u003e are created by the system.\u003c/p\u003e\n"],["\u003cp\u003eApplications can provide their own \u003ccode\u003eBackgroundThreadsFactory\u003c/code\u003e when needing more control, which will then take on the responsibility of creating one or more threads that are blocked on its \u003ccode\u003eCompletionQueue::Run()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe options \u003ccode\u003eGrpcBackgroundThreadPoolSizeOption\u003c/code\u003e, \u003ccode\u003eGrpcCompletionQueueOption\u003c/code\u003e, and \u003ccode\u003eGrpcBackgroundThreadsFactoryOption\u003c/code\u003e cannot be used together, as they are mutually exclusive, where this \u003ccode\u003eGrpcBackgroundThreadsFactoryOption\u003c/code\u003e will be ignored if \u003ccode\u003eGrpcCompletionQueueOption\u003c/code\u003e is set.\u003c/p\u003e\n"]]],[],null,[]]