コード例 #1
0
 private static void OnHpThreadRun(ThreadDispatcher d,int number)
 {
     Random r=new Random();
     Thread.Sleep(r.Next(100,2000));
     d.CheckedIn();
     Console.WriteLine(string.Format("*** Starting High Priority Thread {0} ***",number));
     Thread.Sleep(r.Next(100, 2000));
     Console.WriteLine(string.Format("+++ Finishing High Priority Thread {0} +++", number));
     Thread.Sleep(300);
     d.CheckedOut();           
 }