O'Reilly logo

Visual Studio 2013 Cookbook by Richard Banks, Jeff Martin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making your code asynchronous

So, you've got yourself an application that might be lacking in the performance department. If you're honest, it's probably horribly slow, and yet when you look at the performance counters on the host machine, it doesn't seem to be doing all that much. The odds are high that your existing code is operating slowly and blocking the execution thread, which prevents other code from executing.

It gets even worse in web applications that come under heavy load. Every request thread that gets blocked is a point where other requests can get queued, and before too long you've got yourself a server that is throwing 503 Service Unavailable errors.

Time to take that synchronous code, stick an "a" on the front of it, and more efficiently ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required