I got a System.Threading.Timer
which I change to lower priority (Thread.CurrentThread.Priority = XXXX
).
Do I have to reset the priority before I exit the callback method, or will .Net reset the priority when it get's the thread back?
I got a System.Threading.Timer
which I change to lower priority (Thread.CurrentThread.Priority = XXXX
).
Do I have to reset the priority before I exit the callback method, or will .Net reset the priority when it get's the thread back?
System.Threading.Timer
utilizes the ThreadPool
and changing priorities for those is not recommended: Why *not* change the priority of a ThreadPool (or Task) thread? and it doesn't look like the thread pool changes the priority back. So it seems like you shouldn't do it in the first place but if you do it then you should change it back yourself.