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 }
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 }