Three Essential Tips for Using Async in Microsoft Visual C# and Visual Basic

Sign in to queue

The Discussion

  • User profile image
    ljw1004
  • User profile image
    dp231457

    Very informative and helpful in understanding the flow of control in an asynchronous event handler. The message pump, the processing of those messages, and the completion of a message loop is how I understand this "void" return notion better. Oh, and thank you for sharing the Silverlight group panel example. ASP.NET can use thread pool threads, but from  what I have read, Silverlight, WPF, Windows Forms, and Windows Store apps map an application design model with a threading model that only permits that single thread that created the UI to update that UI. An event handler that returns a Task would have prevented partial print-outs because all of the requested data had not yet populated that panel control.  An async marked event handler that returns a Task would rule have an await expression: the control flow would execute in a more sequential order, despite the pausing point and continuations.

    Many Thanks

Add Your 2 Cents