How to name a thread running a Task?

前端 未结 3 1165
暗喜
暗喜 2021-01-03 22:42

I find naming threads to be very useful when debugging.

I can see no way to name a thread using arguments to Task.Factory.StartNew()

So is it ac

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-03 23:31

    Sure you can, just remove the Name again when you're done. set the thread Name again to "Idle" ore string.Empty after Foobulize();

提交回复
热议问题