O'Reilly logo

Visual Studio 2012 Cookbook by Richard Banks

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 machine it doesn't seem to be doing all that much. What are the odds that your code is doing a slow operation and blocking the execution thread, preventing other code from executing? Pretty high, huh?

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 make ...

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