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.

9
  • 3
    I think he wants to wait asynchronously. Commented Aug 8, 2013 at 19:56
  • @SLaks What do you mean by wait asynchronously? as you can see Here ThreadPool Thread only waits for operations to complete not the main Thread. OP stated that i want to wait for all internal operations to complete before callback for main asynchronous operation executes This code does what he wants. If am wrong correct me! Commented Aug 8, 2013 at 20:01
  • Your foreach loop is blocking. He just wants to call the callback later. Commented Aug 8, 2013 at 20:02
  • -1 for sleeping in a multithreaded asynchronous environment. This answer is not useful. Commented Aug 8, 2013 at 20:07
  • 2
    @SriramSakthivel: The point is that it's a blocking call, which defeats the purpose of asynchrony. Commented Aug 8, 2013 at 20:17