static void Main(string[] args)
{
Thread thread1 = new Thread(new ThreadStart(Thread1));
thread1.Priority = ThreadPriority.Lowest;
Thread thread2 = new Thread(new ThreadStart(Thread2));
thread1.Start();
thread2.Start();
//Console.WriteLine("主线程");
//Console.ReadLine();
}
static void Thread1()
{
Console.WriteLine("线程1");
Console.ReadLine();
}
static void Thread2()
{
Console.WriteLine("线程2");
Console.ReadLine();
}
线程优先级属性值
Norma
lHighest
BelowNormal
AboveNormal
Lowest