Description
The ExecutorProvider
that is used for the Async API in the client library can be set using the SpannerOptions$Builder#setAsyncExecutorProvider
method. This makes it possible for direct users of the Async API to determine the type of executor and the number of threads to use. This configuration is however not accessible to anyone using an abstraction on top of the client library, such as the Spanner R2DBC driver, unless that abstraction has also added support for this configuration property to their own API.
When no ExecutorProvider
has been set, the Java client library will use a default 8-thread Executor
. The '8 threads' is currently hard-coded. We should change this hard-coded value into one that can be set with a system property, so users of both the client library and any driver that builds on top of it can set a different default.