Hello there! It looks like this might be your first time to my website. You should...
Subscribe to my
RSS feed
Follow me
on Twitter.
Check out
.NET Dev Buzz

More on the ThreadPool Bug in .NET 2.0 SP1

Thursday, April 17, 2008 8:31:28 AM (Pacific Standard Time, UTC-08:00)
There appears to be some confusion about this .NET 2.0 SP1 ThreadPool bug I found. Can you believe someone might be wrong on the internet?

If you’ve been following the posts (1, 2, 3), then you’ll know I was in touch with the key guys at Microsoft and the root of the problem is that if you create asynchronous work faster than the ThreadPool can create threads, then that work "misses" the SetMinThreads command and are created more slowly.

That is why the Thread.Sleep(1) probably solves the issue for you. If it doesn’t, sleep slightly longer. It’s a timing issue.

With this insight, you’ll see that this does not really affect true servers such as ASP.NET and WCF but does affect things like Delegate.BeginInvoke and friends called in quick succession.

In short, if your server handles more than 1,000 requests per second, during the first second of startup, then your server may run into this problem (ok, ok, more precisely, if your server handles more than 1 request / millisecond).

Let me address a few common concerns out there:
  • Is the sky falling? No.
  • Is it great situation? No.
  • Will be fixed with .NET 2.0 SP2? Yes
  • When? Maybe this summer, maybe later - they aren’t sure.
  • Does this affect WCF and ASP.NET? Probably not. The bug, no. The new ThreadPool behavior, yes.
  • Is there a work around? Yes, create threads more slowly. This is automatic on the server.

kick it on DotNetKicks.com

Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post

Top 5 Most Important Sessions from Mix 08 (with Video)

Friday, April 04, 2008 6:16:07 AM (Pacific Standard Time, UTC-08:00)
You may have heard that the sessions for Mix 08 were posted online and you can view or download them until your heart is content.

Mix 08 is becoming an increasingly important event in the .NET space. I spent a fair amount of time watching the sessions in the evenings. I was teaching a class and couldn't attend myself.

So who wouldn't want to curl up with a cold beer, a warm laptop, and a bunch of .NET presentations? That's what I want to know. But, maybe you don't have time to go through all 89 sessions? Don't despair, I'll distill them down for you.

BTW, I'd love to link directly to them, but SilverLight and Flash are broken web metaphors (you can't link their content) so you'll have to find them at http://sessions.visitmix.com/.

Without further ado, I present to you my top 5 most important sessions from Mix 08:

  1. T22 - Developing ASP.NET Applications Using the Model View Controller Pattern
    Scott Hanselman

  2. T01 - Creating a RESTful API with Windows Communication Foundation
    Aaron Sloman and Haider Sabri

  3. UX03 - The Back of the Napkin: Solving Design Problems (and Selling Your Solutions) with Pictures
    Dan Roam

  4. T11 - What's New in Windows Presentation Foundation 3.5
    Rob Relyea

  5. T26 - Building Applicaitons and Services with.NET Framework 3.5
    Justin Smith
Of course the keynotes were great too - but they don't really belong in this category.

So get out there and learn something! :) And kick it if you like it: kick it on DotNetKicks.com

Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post


Just a site note: I'm doing my part to rid the world of IE 6. Visit this site with IE 6 and you'll get a shameful message telling you to "Stop Living in the Past".