在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
Parallel.For(0,10, new ParallelOptions(){MaxDegreeOfParallelism = 5}, (i, loopState) => { System.Diagnostics.Debug.WriteLine("Start Thread={0}, i={1}", Thread.CurrentThread.ManagedThreadId, i); Thread.Sleep(i*200); Console.WriteLine("Finish Thread={0}, i={1}", Thread.CurrentThread.ManagedThreadId, i); });
|
请发表评论