How to make BackgroundWorker ProgressChanged events execute in sequence?
问题 Consider the following code: private static BackgroundWorker bg = new BackgroundWorker(); static void Main(string[] args) { bg.DoWork += bg_DoWork; bg.ProgressChanged += bg_ProgressChanged; bg.WorkerReportsProgress = true; bg.RunWorkerAsync(); Thread.Sleep(10000); } static void bg_ProgressChanged(object sender, ProgressChangedEventArgs e) { Console.WriteLine(e.ProgressPercentage); Thread.Sleep(100); Console.WriteLine(e.ProgressPercentage); } static void bg_DoWork(object sender,