ILoggable

A place to keep my thoughts on programming

 Subscribe

geekblog
[at]
claassen [dot] net

Powered by Blogger

Wednesday, June 14, 2006

ThreadSingleton revisited

I've been using the CallContext for a while now to create thread singletons, especially under ASP.NET since it's a single process and you need to work in a thread context when dealing with per request singletons.

Today a co-worker pointed out this post. Apparently you can't trust CallContext under ASP.NET. You really should stuff your singletons into HttpContext when running under ASP.NET, just to be sure. It's a good read.

0 Comments:

Post a Comment

<< Home