Browsed by
Tag: block

Don’t Block on Async Code

Don’t Block on Async Code

Source This is a problem that is brought up repeatedly on the forums and Stack Overflow. I think it’s the most-asked question by async newcomers once they’ve learned the basics. UI Example Consider the example below. A button click will initiate a REST call and display the results in a text box (this sample is for Windows Forms, but the same principles apply to any UI application).

The “GetJson” helper method takes care of making the actual REST call and parsing…

Read More Read More