Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • "That's the way to do it". Excellent, thanks. I had tried the WhenAll method but obviously had missed an interim step. I take your point about the Async method naming convention and I do agree. I'll implement this. Commented Apr 23, 2015 at 13:02
  • Shouldn't the last line in both code blocks be return Json(things, JsonRequestBehavior.AllowGet);? result doesn't appear to be defined in either code block. Commented Jan 24, 2018 at 18:38
  • @M.Babcock Correct, it's fixed now. Thanks Commented Jan 24, 2018 at 18:49
  • This method is an anti pattern. The reason in that you don't know how much items in a collection. It can overload ThreadPool. In this case you should use TPL or split items on small blocks and WaitAll in a loop limited number of tasks. Commented Dec 13, 2023 at 9:51