Grpc.Core.GrpcEnvironment.GetThreadPoolSizeOrDefault C# (CSharp) 메소드

GetThreadPoolSizeOrDefault() 개인적인 메소드

private GetThreadPoolSizeOrDefault ( ) : int
리턴 int
        private int GetThreadPoolSizeOrDefault()
        {
            if (customThreadPoolSize.HasValue)
            {
                return customThreadPoolSize.Value;
            }
            // In systems with many cores, use half of the cores for GrpcThreadPool
            // and the other half for .NET thread pool. This heuristic definitely needs
            // more work, but seems to work reasonably well for a start.
            return Math.Max(MinDefaultThreadPoolSize, Environment.ProcessorCount / 2);
        }