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\u003eThe latest version available is 2.37.0-rc, with numerous previous versions, such as 2.36.0, 2.35.0, and so on, down to 2.10.1, also accessible.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBackgroundThreadsFactory\u003c/code\u003e can be customized by applications to manage background work threads and \u003ccode\u003eCompletionQueue\u003c/code\u003e operations more granularly.\u003c/p\u003e\n"],["\u003cp\u003eConnections commonly create a background thread and a \u003ccode\u003eCompletionQueue\u003c/code\u003e for background work, but applications can take more control by supplying their own \u003ccode\u003eBackgroundThreadsFactory\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGrpcBackgroundThreadsFactoryOption\u003c/code\u003e is mutually exclusive with \u003ccode\u003eGrpcCompletionQueueOption\u003c/code\u003e, and is ignored if \u003ccode\u003eGrpcCompletionQueueOption\u003c/code\u003e is active, also note that it is mutually exclusive with \u003ccode\u003eGrpcBackgroundThreadPoolSizeOption\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]