On Mon, 2009-04-27 at 13:35 +0200, Giacomo Tesio wrote: > Singletons and Implementations dictionaries should be thread safe, > shouldn't them?
Yes. By default, instance members need not be thread-safe, but static members must be thread safe. This may include instance members of types that are accessible from static members, depending on what those instance members do. (For example, if the instance members deal with a collection, AND the static member returns a shared instance each time it's called, then the instance members will need to be thread safe.) > Moreover since shared, the singletons it provide must be thread safe. > They are. > > But... I could try to make them faster using ReaderWriterLockSlim. I would suggest waiting for profiling data before using ReaderWriterLockSlim, to make sure that you're optimizing the right parts. - Jon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dblinq?hl=en -~----------~----~----~----~------~----~------~--~---
