Grpc.Core.Internal.GrpcThreadPool.CreateAndStartThread C# (CSharp) Méthode

CreateAndStartThread() private méthode

private CreateAndStartThread ( int threadIndex, IProfiler optionalProfiler ) : Thread
threadIndex int
optionalProfiler IProfiler
Résultat Thread
        private Thread CreateAndStartThread(int threadIndex, IProfiler optionalProfiler)
        {
            var cqIndex = threadIndex % completionQueues.Count;
            var cq = completionQueues.ElementAt(cqIndex);

            var thread = new Thread(new ThreadStart(() => RunHandlerLoop(cq, optionalProfiler)));
            thread.IsBackground = true;
            thread.Name = string.Format("grpc {0} (cq {1})", threadIndex, cqIndex);
            thread.Start();

            return thread;
        }