title: Thread priority (how to get fixed order)
body: <p>in console because threads sleep with randoms it will show the order of threads
  3,2,1 or 1,2,3 or ...
  how can I have fixed order?
  and why when I set priority it doeasn't effect the code?
        // ThreadTester.cs
          // Multiple threads printing at different intervals.</p>
  
  <pre><code>    using System;
      using System.Threading;
  
      namespace threadTester
      {
          // class ThreadTester demonstrates basic threading concepts
          class ThreadTester
          {
              static void Main(string[] args)
              {
                  // Create and name each thread. Use MessagePrinter's
                  // Print method as argument to ThreadStart delegate.
                  MessagePrinter printer1 = new MessagePrinter();
                  Thread thread1 =
                     new Thread(new ThreadStart(printer1.Print));
                  thread1.Name = "thread1";
  
                  MessagePrinter printer2 = new MessagePrinter();
                  Thread thread2 =
                     new Thread(new ThreadStart(printer2.Print));
                  thread2.Name = "thread2";
  
                  MessagePrinter printer3 = new MessagePrinter();
                  Thread thread3 =
                     new Thread(new ThreadStart(printer3.Print));
                  thread3.Name = "thread3";
  
                  Console.WriteLine("Starting threads");
  
                  // call each thread's Start method to place each 
                  // thread in Started state
                  thread1.Priority = ThreadPriority.Lowest;
                  thread2.Priority = ThreadPriority.Normal;
                  thread3.Priority = ThreadPriority.Highest;
                  thread1.Start();
                  thread2.Start();
                  thread3.Start();
  
                  Console.WriteLine("Threads started\n");
                  Console.ReadLine();
  
              } // end method Main
  
          } // end class ThreadTester
  
          // Print method of this class used to control threads
          class MessagePrinter
          {
              private int sleepTime;
              private static Random random = new Random();
  
              // constructor to initialize a MessagePrinter object
              public MessagePrinter()
              {
                  // pick random sleep time between 0 and 5 seconds
                  sleepTime = random.Next(5001);
              }
  
              // method Print controls thread that prints messages
              public void Print()
              {
                  // obtain reference to currently executing thread
                  Thread current = Thread.CurrentThread;
  
                  // put thread to sleep for sleepTime amount of time
                  Console.WriteLine(
                     current.Name + " going to sleep for " + sleepTime);
  
                  Thread.Sleep(sleepTime);
  
                  // print thread name
                  Console.WriteLine(current.Name + " done sleeping");
  
              } // end method Print
  
          } // end class MessagePrinter
      }
  </code></pre>