protected void ReStartApplication() { Thread.Sleep(2000); Process.Start(this.GetType().Assembly.Location); Application.Exit(); } Read More
posted @ 2012-01-18 10:03 咸鱼公子 Views(1215) Comments(0) Diggs(0) Edit
http://hi.baidu.com/jiang_yy_jiang/blog/item/23294013384be4c7f6039e2e.htmlpublic class JPService { public JPService() { //设定最大的Net并发连接数 System.Net.ServicePointManager.DefaultConnectionLimit = 500; ThreadPool.SetMinThreads(15 , 2);//设置最小的工作线程数和IO线程数 Config.Load(); } private int MaxThread = 1... Read More
posted @ 2012-01-18 09:05 咸鱼公子 Views(10233) Comments(0) Diggs(0) Edit