Skip to content


  1. The async Keyword and Thrown Exceptions - Stiller on Software
    December 23, 2012 @ 4:16 pm

    […] a similar post on the await keyword can be found here. Share this:FacebookTwitterLinkedInMoreEmailPrintDiggRedditStumbleUponTumblrPinterest This entry […]


  2. Boaz
    July 2, 2015 @ 8:55 am


    “await asyncTest.ProcessAsync2(null);” will not throw an exception unless you add Thread.Sleep(200);

    The reason is that the program is finished execution before the async operion raise an exception


    • Eran Stiller
      July 2, 2015 @ 9:06 am

      Hi Boaz,
      Actually no. It will throw the exception without any need for “Thread.Sleep()” since “await” itself does the wait. I suspect that the issue you are seeing is that you are not waiting for the asynchronous method encapsulating the “await” itself to finish, thus causing the program to terminate before it reaches this line.
      As a side note, please be aware that using “Thread.Sleep()” for synchronization is not a good practice. It would have been better to do something like this:

      static void Main()

      static async Task Do()
      var asyncTest = new AsyncClass();
      await asyncTest.ProcessAsync2(null);



  3. Patrick Fischer
    January 30, 2017 @ 5:57 pm


    You wrote:
    “…and it does require the await keyword which is limited only to methods marked with async…”

    Surely it should be:

    “…and it does not require the await keyword which is limited only to methods marked with async….”


    • Eran Stiller
      January 30, 2017 @ 8:50 pm

      Yes, you are absolutely correct. Just fixed it.
      Thank you!


Have an Opinion?