Setting thread priority.

  • Thread starter Thread starter Frank Rizzo
  • Start date Start date
F

Frank Rizzo

I set the thread priority via the following statement.

System.Threading.Thread.CurrentThread.Priority =
Threading.ThreadPriority.AboveNormal;

However, when I look at the thread priority in the Task Manager, it
reports it as Normal.

What am I missing here?
 
Frank,
However, when I look at the thread priority in the Task Manager, it
reports it as Normal.

As far as I know, Task Manager only lists processes, not threads.
You're probably seeing the process base priority.



Mattias
 
Willy said:
You can also see this using perfmon.

Thank you all. I figured out how to do it. The priority for the entire
process is changed via the following method:

System.Diagnostics.Process.GetCurrentProcess.PriorityClass =
ProcessPriorityClass.Idle
 
Back
Top