Keeping UI responsive during a Thread.Sleep() [duplicate]
问题 This question already has answers here : update UI in Task using TaskScheduler.FromCurrentSynchronizationContext (4 answers) Closed 4 years ago . Background: I am writing an application that iterates through a list of servers and obtains various details about each machine. During the iteration, I need to update various controls on the form (to display a summary of the obtained information). Because it is iterating through a list, I have called a Thread.Sleep() to allow the user time to read