感觉用c#进行开发就是快
using system;
using system.threading;
namespace consoleapplication1
{
 /// <summary>
 /// class1 的摘要说明。
 /// </summary>
 class class1
 {
  /// <summary>
  /// 应用程序的主入口点。
  /// </summary>
  [stathread]
  static void main(string[] args)
  {
   //
   // todo: 在此处添加代码以启动应用程序
   //
   thread thread1 = new thread(new threadstart(method1));
   thread thread2 = new thread(new threadstart(method2));
   thread1.start();
   thread2.start();
   
  }
  public static void method1()
  {
   while(true)
   {
    console.writeline("this is thread : 1");
    thread.sleep(1000);
   }
   
  }
  public static void method2()
  {
   while (true)
   {
    console.writeline("this is thread : 2");
    thread.sleep(1520);
   }
   
  }
 }
}
新闻热点
疑难解答