diff options
Diffstat (limited to 'include/grpc++/server_builder.h')
-rw-r--r-- | include/grpc++/server_builder.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index a56f81dc4b..2185b283ac 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -46,6 +46,7 @@ #include <grpc/compression.h> #include <grpc/support/cpu.h> #include <grpc/support/useful.h> +#include <grpc/support/workaround_list.h> struct grpc_resource_quota; @@ -184,6 +185,11 @@ class ServerBuilder { static void InternalAddPluginFactory( std::unique_ptr<ServerBuilderPlugin> (*CreatePlugin)()); + /// Enable a server workaround. Do not use unless you know what the workaround + /// does. For explanation and detailed descriptions of workarounds, see + /// doc/workarounds.md. + ServerBuilder& EnableWorkaround(grpc_workaround_list id); + private: friend class ::grpc::testing::ServerBuilderPluginTest; @@ -195,7 +201,7 @@ class ServerBuilder { struct SyncServerSettings { SyncServerSettings() - : num_cqs(gpr_cpu_num_cores()), + : num_cqs(GPR_MAX(1, gpr_cpu_num_cores())), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {} |