Grpc.Core.GrpcEnvironment.SetThreadPoolSize C# (CSharp) Method

SetThreadPoolSize() public static method

Sets the number of threads in the gRPC thread pool that polls for internal RPC events. Can be only invoke before the GrpcEnviroment is started and cannot be changed afterwards. Setting thread pool size is an advanced setting and you should only use it if you know what you are doing. Most users should rely on the default value provided by gRPC library. Note: this method is part of an experimental API that can change or be removed without any prior notice.
public static SetThreadPoolSize ( int threadCount ) : void
threadCount int
return void
        public static void SetThreadPoolSize(int threadCount)
        {
            lock (staticLock)
            {
                GrpcPreconditions.CheckState(instance == null, "Can only be set before GrpcEnvironment is initialized");
                GrpcPreconditions.CheckArgument(threadCount > 0, "threadCount needs to be a positive number");
                customThreadPoolSize = threadCount;
            }
        }