Parallel.ForEach using Thread.Sleep equivalent
问题 So here's the situation: I need to make a call to a web site that starts a search. This search continues for an unknown amount of time, and the only way I know if the search has finished is by periodically querying the website to see if there's a "Download Data" link somewhere on it (it uses some strange ajax call on a javascript timer to check the backend and update the page, I think). So here's the trick: I have hundreds of items I need to search for, one at a time. So I have some code that