Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Answer: Your own ThreadLocal

AddThis Social Bookmark Button
Originally posted at 12/15/2010Well, the problem on our last answer was that we didn’t protect ourselves from multi threaded access to the slots variable. Here is the code with this fixed: public class CloseableThreadLocal { [ThreadStatic] public static Dictionary slots; private readonly
object holder = new object(); private Dictionary capturedSlots; private Dictionary Slots { get { if (slots == null) ...(Read whole news on source site)

Home : Blog List : VibrantCode : Answer: Your own ThreadLocal