SmartThreadPool - A .NET Thread Pool fully implemented in C# with many features

https://github.com/amibar/SmartThreadPool

using Amib.Threading;

...

                    SmartThreadPool stp = new SmartThreadPool();
                    int index = 1;
                    foreach (object[] cols in result)
                    {
                        Console.WriteLine(string.Format(@"进度: {0}/{1}", index, result.Count));
                        index++;

                        stp.QueueWorkItem(saveReadingReportAsJson, cols, categoryOrder);
                    }
                    stp.WaitForIdle();
                    stp.Shutdown();

 

posted @ 2020-10-01 16:04  荣神益人  阅读(161)  评论(0编辑  收藏  举报