How to enumerate threads in .NET using the Name property?

前端 未结 4 687
-上瘾入骨i
-上瘾入骨i 2021-01-17 10:44

Suppose I start two threads like this:

// Start first thread
Thread loaderThread1 = new Thread(loader.Load);
loaderThread1.Name = \"Rope\";
loaderThread1.Sta         


        
4条回答
  •  迷失自我
    2021-01-17 11:17

    Note also that thread names are not required to be unique. Seems like using the thread ID might be a better option...

提交回复
热议问题