//InterKnowlogy/ Blogs - Async or Asink?
More and more nowadays there is a push to run more application code in an asynchronous manner to prevent blocking the UI thread and making the application unresponsive. As the need for this type of programming becomes more prevalent thankfully the APIs to do so have also become easier to implement. The last part (easier APIs) has led to more and more async code sprinkled through an application like the little candies on top of donuts. Unfortunately the easier APIs also mean it’s easier to abuse the functionality by not properly implementing exception handling.
All of these async sprinkles can sink an application fast as code may be exploding left and right with the application user non the wiser. From the users perspective everything seems like it’s ok (i.e. the app doesn’t abort or show error dialogs) but nothing seems to be working.
I’d like to take a moment to look at various ways to async a task and highlight the exception handling issues related to each. To do this I am going to use the following program framework. My goal each time is to first see whether an unhandled exception occurs and if so then to handle it appropriately.
...
Thought this a great, in-depth article on async and some the perils and pitfalls of async dev.
No comments:
Post a Comment
NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...
ALL comments are moderated. I will review every comment before it will appear on the blog.
Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...
I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...
Please see my comment policy for more information if you are interested.
Thanks,
Greg
PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...