Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Jeffrey Richter and his AsyncEnumerator
Dec 06, 2008 at 3:42 AMNice to hear from you! Regarding Outlook, I agree that spawning 50 threads is way over the top. There's a difference, though, between consuming 50 threads for the life of the application and starting two threads that will run for a second.
I wonder what Outlook is doing to consume that many threads. I never would have imagined that checking one's e-mail was that complicated!
Cheers
Joe
Jeffrey Richter and his AsyncEnumerator
Dec 05, 2008 at 5:23 PM(1) have potentially hundreds or thousands of parallel execution paths
(2) spend most of their time blocking
Without (1), you won't gain enough through the APM to justify the extra programming effort. Without (2), you won't save anything with the APM. The quintessential application is a sockets server that accepts requests over the net. Because the Internet is slow, requests may take many seconds from end to end, and yet spend most of their time blocked waiting on a slow network. A well-written asynchronous TCP server can handle a thousand concurrent requests while consuming just a few threads.
APM relies on methods returning with a callback rather than blocking the underlying thread. There are actually fairly few truely asycnhronous methods in the .NET Framework - most are related to networking, where the most gains are to be had.
foreach (var foo in far)
AnotherMethod (foo);
then AnotherMethod couldn't do anything asynchronous within its implementation.
Joe