http://www.cnblogs.com/ybhcolin/archive/2011/05/20/2052222.html 

以上代码.如果在高并发下会产生什么问题,开启1000个线程来模拟高并发

 

 1  static void Main(string[] args)
 2         {
 3             for (int i = 0; i < 1000; i++)
 4             {
 5                 System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(Logs.WriteLine));
 6                 t.Name = "线程" + i.ToString();
 7                 t.Start();
 8             }
 9             Console.Read();
10         }

相关文章:

  • 2021-05-16
  • 2021-08-26
  • 2022-01-30
  • 2022-12-23
  • 2021-09-27
  • 2022-01-01
  • 2021-12-18
  • 2021-04-23
猜你喜欢
  • 2022-01-02
  • 2021-07-26
  • 2022-01-20
  • 2021-04-14
  • 2022-01-01
  • 2021-04-18
  • 2021-11-17
相关资源
相似解决方案