Async

AOP – using PostSharp attributes with async Task/Task<T> methods

NOTE: if you’re unfamiliar with how PostSharp works under the hood, I highly recommend that you check out Dustin Davis‘ excellent PostSharp Principles series of blog posts here. The Problem The new async/await keywords in C# are pretty awesome, and makes life an awful lot easier when writing asynchronous and non-blocking IO code. However, for …

AOP – using PostSharp attributes with async Task/Task<T> methods Read More »

C# – beware of async void in your code

In general, when you see async void in your code it’s bad news, because: you can’t wait for its completion (as mentioned in this post already) any unhandled exceptions will terminate your process (ouch!)   Suppose you have a timer event that fires every once in a while and you want to do some asynchronous …

C# – beware of async void in your code Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close