Why *not* change the priority of a ThreadPool (or Task) thread?

前端 未结 6 1455
情深已故
情深已故 2020-12-06 09:25

There are many places across the web and Stack Overflow where one is discouraged from changing the priority of a ThreadPool thread or TPL Task

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-06 10:03

    You certainly can change it if you really want to, but given that the thread pool threads are re-used, the next code that runs might not expect the change.

提交回复
热议问题